jspurefix 1.2.0 → 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 (1116) hide show
  1. package/.travis.yml +1 -1
  2. package/README.md +48 -2
  3. package/appveyor.yml +46 -11
  4. package/data/session/certs/ca/ca.crt +33 -0
  5. package/data/session/certs/ca/ca.key +54 -0
  6. package/data/session/certs/client/client.crt +31 -0
  7. package/data/session/certs/client/client.key +51 -0
  8. package/data/session/certs/server/server.crt +31 -0
  9. package/data/session/certs/server/server.key +51 -0
  10. package/data/session/genkey.ps1 +179 -0
  11. package/dist/a-session-msg-factory.d.ts +0 -0
  12. package/dist/a-session-msg-factory.js +1 -0
  13. package/dist/a-session-msg-factory.js.map +1 -0
  14. package/dist/ascii-encoder.test.d.ts +0 -0
  15. package/dist/ascii-encoder.test.js +1 -0
  16. package/dist/ascii-encoder.test.js.map +1 -0
  17. package/dist/ascii-parser.test.d.ts +0 -0
  18. package/dist/ascii-parser.test.js +1 -0
  19. package/dist/ascii-parser.test.js.map +1 -0
  20. package/dist/ascii-segment.test.d.ts +0 -0
  21. package/dist/ascii-segment.test.js +1 -0
  22. package/dist/ascii-segment.test.js.map +1 -0
  23. package/dist/ascii-store-replay.test.d.ts +0 -0
  24. package/dist/ascii-store-replay.test.js +1 -0
  25. package/dist/ascii-store-replay.test.js.map +1 -0
  26. package/dist/ascii-tag-pos.test.d.ts +0 -0
  27. package/dist/ascii-tag-pos.test.js +1 -0
  28. package/dist/ascii-tag-pos.test.js.map +1 -0
  29. package/dist/buffer/{ascii-chars.d.ts → ascii/ascii-chars.d.ts} +0 -0
  30. package/dist/buffer/{ascii-chars.js → ascii/ascii-chars.js} +0 -0
  31. package/dist/buffer/ascii/ascii-chars.js.map +1 -0
  32. package/dist/buffer/ascii/ascii-encoder.d.ts +5 -3
  33. package/dist/buffer/ascii/ascii-encoder.js +82 -48
  34. package/dist/buffer/ascii/ascii-encoder.js.map +1 -1
  35. package/dist/buffer/ascii/ascii-parser-state.d.ts +3 -10
  36. package/dist/buffer/ascii/ascii-parser-state.js +37 -25
  37. package/dist/buffer/ascii/ascii-parser-state.js.map +1 -1
  38. package/dist/buffer/ascii/ascii-parser.d.ts +7 -7
  39. package/dist/buffer/ascii/ascii-parser.js +50 -24
  40. package/dist/buffer/ascii/ascii-parser.js.map +1 -1
  41. package/dist/buffer/ascii/ascii-segment-parser.d.ts +2 -2
  42. package/dist/buffer/ascii/ascii-segment-parser.js +34 -13
  43. package/dist/buffer/ascii/ascii-segment-parser.js.map +1 -1
  44. package/dist/buffer/ascii/ascii-view.d.ts +2 -4
  45. package/dist/buffer/ascii/ascii-view.js +11 -15
  46. package/dist/buffer/ascii/ascii-view.js.map +1 -1
  47. package/dist/buffer/ascii/index.d.ts +1 -0
  48. package/dist/buffer/ascii/index.js +1 -0
  49. package/dist/buffer/ascii/index.js.map +1 -1
  50. package/dist/buffer/ascii/parse-state.d.ts +8 -0
  51. package/dist/buffer/ascii/parse-state.js +13 -0
  52. package/dist/buffer/ascii/parse-state.js.map +1 -0
  53. package/dist/buffer/ascii/time-formatter.js +1 -1
  54. package/dist/buffer/ascii/time-formatter.js.map +1 -1
  55. package/dist/buffer/elastic-buffer.js +29 -8
  56. package/dist/buffer/elastic-buffer.js.map +1 -1
  57. package/dist/buffer/encode-proxy.d.ts +1 -1
  58. package/dist/buffer/encode-proxy.js +16 -17
  59. package/dist/buffer/encode-proxy.js.map +1 -1
  60. package/dist/buffer/fixml/fixml-encoder.d.ts +2 -1
  61. package/dist/buffer/fixml/fixml-encoder.js +43 -20
  62. package/dist/buffer/fixml/fixml-encoder.js.map +1 -1
  63. package/dist/buffer/fixml/fixml-parser.js +47 -24
  64. package/dist/buffer/fixml/fixml-parser.js.map +1 -1
  65. package/dist/buffer/fixml/fixml-view.d.ts +2 -2
  66. package/dist/buffer/fixml/fixml-view.js +13 -13
  67. package/dist/buffer/fixml/fixml-view.js.map +1 -1
  68. package/dist/buffer/fixml/populated-attributes.d.ts +5 -0
  69. package/dist/buffer/fixml/populated-attributes.js +3 -0
  70. package/dist/buffer/fixml/populated-attributes.js.map +1 -0
  71. package/dist/buffer/index.d.ts +4 -8
  72. package/dist/buffer/index.js +4 -8
  73. package/dist/buffer/index.js.map +1 -1
  74. package/dist/buffer/msg-encoder.d.ts +2 -1
  75. package/dist/buffer/msg-encoder.js.map +1 -1
  76. package/dist/buffer/msg-view.d.ts +3 -3
  77. package/dist/buffer/msg-view.js +8 -5
  78. package/dist/buffer/msg-view.js.map +1 -1
  79. package/dist/buffer/segment/segment-description.d.ts +26 -0
  80. package/dist/buffer/segment/segment-description.js +72 -0
  81. package/dist/buffer/segment/segment-description.js.map +1 -0
  82. package/dist/buffer/segment/segment-summary.d.ts +13 -0
  83. package/dist/buffer/segment/segment-summary.js +20 -0
  84. package/dist/buffer/segment/segment-summary.js.map +1 -0
  85. package/dist/buffer/segment/segment-type.d.ts +8 -0
  86. package/dist/buffer/segment/segment-type.js +13 -0
  87. package/dist/buffer/segment/segment-type.js.map +1 -0
  88. package/dist/buffer/segment-description.d.ts +2 -9
  89. package/dist/buffer/segment-description.js +5 -13
  90. package/dist/buffer/segment-description.js.map +1 -1
  91. package/dist/buffer/segment-type.d.ts +8 -0
  92. package/dist/buffer/segment-type.js +13 -0
  93. package/dist/buffer/segment-type.js.map +1 -0
  94. package/dist/buffer/structure.d.ts +3 -3
  95. package/dist/buffer/structure.js +1 -1
  96. package/dist/buffer/structure.js.map +1 -1
  97. package/dist/buffer/tag/tag-pos.d.ts +12 -0
  98. package/dist/buffer/tag/tag-pos.js +55 -0
  99. package/dist/buffer/tag/tag-pos.js.map +1 -0
  100. package/dist/buffer/tag/tag-type.d.ts +13 -0
  101. package/dist/buffer/tag/tag-type.js +18 -0
  102. package/dist/buffer/tag/tag-type.js.map +1 -0
  103. package/dist/buffer/tag/tags.d.ts +21 -0
  104. package/dist/buffer/tag/tags.js +122 -0
  105. package/dist/buffer/tag/tags.js.map +1 -0
  106. package/dist/buffer/tag-type.d.ts +13 -0
  107. package/dist/buffer/tag-type.js +18 -0
  108. package/dist/buffer/tag-type.js.map +1 -0
  109. package/dist/buffer/tags.d.ts +3 -14
  110. package/dist/buffer/tags.js +23 -36
  111. package/dist/buffer/tags.js.map +1 -1
  112. package/dist/config/get-js-fx-logger.d.ts +4 -0
  113. package/dist/config/get-js-fx-logger.js +3 -0
  114. package/dist/config/get-js-fx-logger.js.map +1 -0
  115. package/dist/config/index.d.ts +1 -0
  116. package/dist/config/index.js +1 -0
  117. package/dist/config/index.js.map +1 -1
  118. package/dist/config/js-fix-config.d.ts +4 -1
  119. package/dist/config/js-fix-config.js +3 -3
  120. package/dist/config/js-fix-config.js.map +1 -1
  121. package/dist/config/js-fix-logger.d.ts +0 -3
  122. package/dist/config/js-fix-logger.js.map +1 -1
  123. package/dist/dict-parser.js +30 -25
  124. package/dist/dict-parser.js.map +1 -1
  125. package/dist/dictionary/compiler/compiler-type.js +7 -7
  126. package/dist/dictionary/compiler/compiler-type.js.map +1 -1
  127. package/dist/dictionary/compiler/enum-compiler.d.ts +1 -0
  128. package/dist/dictionary/compiler/enum-compiler.js +11 -1
  129. package/dist/dictionary/compiler/enum-compiler.js.map +1 -1
  130. package/dist/dictionary/compiler/msg-compiler.js +8 -6
  131. package/dist/dictionary/compiler/msg-compiler.js.map +1 -1
  132. package/dist/dictionary/contained/contained-component-field.js +2 -1
  133. package/dist/dictionary/contained/contained-component-field.js.map +1 -1
  134. package/dist/dictionary/contained/contained-field-dispatch.d.ts +1 -14
  135. package/dist/dictionary/contained/contained-field-dispatch.js +4 -4
  136. package/dist/dictionary/contained/contained-field-dispatch.js.map +1 -1
  137. package/dist/dictionary/contained/contained-field-dispatcher.d.ts +14 -0
  138. package/dist/dictionary/contained/contained-field-dispatcher.js +3 -0
  139. package/dist/dictionary/contained/contained-field-dispatcher.js.map +1 -0
  140. package/dist/dictionary/contained/contained-field-set.d.ts +1 -1
  141. package/dist/dictionary/contained/contained-field-set.js +12 -11
  142. package/dist/dictionary/contained/contained-field-set.js.map +1 -1
  143. package/dist/dictionary/contained/contained-field-type.d.ts +5 -0
  144. package/dist/dictionary/contained/contained-field-type.js +10 -0
  145. package/dist/dictionary/contained/contained-field-type.js.map +1 -0
  146. package/dist/dictionary/contained/contained-field.d.ts +1 -5
  147. package/dist/dictionary/contained/contained-field.js +1 -7
  148. package/dist/dictionary/contained/contained-field.js.map +1 -1
  149. package/dist/dictionary/contained/contained-group-field.js +2 -1
  150. package/dist/dictionary/contained/contained-group-field.js.map +1 -1
  151. package/dist/dictionary/contained/contained-simple-field.js +2 -1
  152. package/dist/dictionary/contained/contained-simple-field.js.map +1 -1
  153. package/dist/dictionary/{fields-dispatch.d.ts → contained/field-dispatcher.d.ts} +3 -2
  154. package/dist/dictionary/contained/field-dispatcher.js +3 -0
  155. package/dist/dictionary/contained/field-dispatcher.js.map +1 -0
  156. package/dist/dictionary/contained/fields-dispatch.d.ts +6 -0
  157. package/dist/dictionary/contained/fields-dispatch.js +42 -0
  158. package/dist/dictionary/contained/fields-dispatch.js.map +1 -0
  159. package/dist/dictionary/contained/index.d.ts +2 -0
  160. package/dist/dictionary/contained/index.js +2 -0
  161. package/dist/dictionary/contained/index.js.map +1 -1
  162. package/dist/dictionary/contained-set-type.d.ts +5 -0
  163. package/dist/dictionary/contained-set-type.js +10 -0
  164. package/dist/dictionary/contained-set-type.js.map +1 -0
  165. package/dist/dictionary/definition/component-field-definition.js +2 -2
  166. package/dist/dictionary/definition/component-field-definition.js.map +1 -1
  167. package/dist/dictionary/definition/fix-definitions.d.ts +2 -1
  168. package/dist/dictionary/definition/fix-definitions.js.map +1 -1
  169. package/dist/dictionary/definition/group-field-definition.js +2 -2
  170. package/dist/dictionary/definition/group-field-definition.js.map +1 -1
  171. package/dist/dictionary/definition/index.d.ts +0 -1
  172. package/dist/dictionary/definition/index.js +0 -1
  173. package/dist/dictionary/definition/index.js.map +1 -1
  174. package/dist/dictionary/definition/message-definition.js +2 -2
  175. package/dist/dictionary/definition/message-definition.js.map +1 -1
  176. package/dist/dictionary/definition/simple-field-definition.d.ts +1 -1
  177. package/dist/dictionary/definition/simple-field-definition.js +5 -4
  178. package/dist/dictionary/definition/simple-field-definition.js.map +1 -1
  179. package/dist/dictionary/dict-primitive.d.ts +0 -11
  180. package/dist/dictionary/dict-primitive.js +0 -7
  181. package/dist/dictionary/dict-primitive.js.map +1 -1
  182. package/dist/dictionary/fix-definition-source.d.ts +6 -0
  183. package/dist/dictionary/fix-definition-source.js +11 -0
  184. package/dist/dictionary/fix-definition-source.js.map +1 -0
  185. package/dist/dictionary/fix-versions.d.ts +0 -9
  186. package/dist/dictionary/fix-versions.js +1 -39
  187. package/dist/dictionary/fix-versions.js.map +1 -1
  188. package/dist/dictionary/index.d.ts +1 -5
  189. package/dist/dictionary/index.js +1 -5
  190. package/dist/dictionary/index.js.map +1 -1
  191. package/dist/dictionary/parser/fix-repository/abbreviations-parser.d.ts +1 -3
  192. package/dist/dictionary/parser/fix-repository/abbreviations-parser.js +2 -3
  193. package/dist/dictionary/parser/fix-repository/abbreviations-parser.js.map +1 -1
  194. package/dist/dictionary/parser/fix-repository/base-parser.d.ts +2 -4
  195. package/dist/dictionary/parser/fix-repository/base-parser.js +1 -2
  196. package/dist/dictionary/parser/fix-repository/base-parser.js.map +1 -1
  197. package/dist/dictionary/parser/fix-repository/components-parser.d.ts +1 -3
  198. package/dist/dictionary/parser/fix-repository/components-parser.js +2 -3
  199. package/dist/dictionary/parser/fix-repository/components-parser.js.map +1 -1
  200. package/dist/dictionary/parser/fix-repository/data-types-parser.d.ts +1 -3
  201. package/dist/dictionary/parser/fix-repository/data-types-parser.js +2 -3
  202. package/dist/dictionary/parser/fix-repository/data-types-parser.js.map +1 -1
  203. package/dist/dictionary/parser/fix-repository/enums-parser.d.ts +1 -3
  204. package/dist/dictionary/parser/fix-repository/enums-parser.js +2 -3
  205. package/dist/dictionary/parser/fix-repository/enums-parser.js.map +1 -1
  206. package/dist/dictionary/parser/fix-repository/fields-parser.d.ts +1 -3
  207. package/dist/dictionary/parser/fix-repository/fields-parser.js +2 -3
  208. package/dist/dictionary/parser/fix-repository/fields-parser.js.map +1 -1
  209. package/dist/dictionary/parser/fix-repository/messages-parser.d.ts +1 -3
  210. package/dist/dictionary/parser/fix-repository/messages-parser.js +2 -3
  211. package/dist/dictionary/parser/fix-repository/messages-parser.js.map +1 -1
  212. package/dist/dictionary/parser/fix-repository/msg-contents-parser.d.ts +1 -3
  213. package/dist/dictionary/parser/fix-repository/msg-contents-parser.js +2 -3
  214. package/dist/dictionary/parser/fix-repository/msg-contents-parser.js.map +1 -1
  215. package/dist/dictionary/parser/fix-repository/repository-abbreviation.d.ts +5 -0
  216. package/dist/dictionary/parser/fix-repository/repository-abbreviation.js +3 -0
  217. package/dist/dictionary/parser/fix-repository/repository-abbreviation.js.map +1 -0
  218. package/dist/dictionary/parser/fix-repository/repository-component.d.ts +10 -0
  219. package/dist/dictionary/parser/fix-repository/repository-component.js +3 -0
  220. package/dist/dictionary/parser/fix-repository/repository-component.js.map +1 -0
  221. package/dist/dictionary/parser/fix-repository/repository-data-type.d.ts +6 -0
  222. package/dist/dictionary/parser/fix-repository/repository-data-type.js +3 -0
  223. package/dist/dictionary/parser/fix-repository/repository-data-type.js.map +1 -0
  224. package/dist/dictionary/parser/fix-repository/repository-enum.d.ts +7 -0
  225. package/dist/{standard_header.js → dictionary/parser/fix-repository/repository-enum.js} +1 -1
  226. package/dist/dictionary/parser/fix-repository/repository-enum.js.map +1 -0
  227. package/dist/dictionary/parser/fix-repository/repository-field.d.ts +11 -0
  228. package/dist/dictionary/parser/fix-repository/repository-field.js +3 -0
  229. package/dist/dictionary/parser/fix-repository/repository-field.js.map +1 -0
  230. package/dist/dictionary/parser/fix-repository/repository-message.d.ts +11 -0
  231. package/dist/dictionary/parser/fix-repository/repository-message.js +3 -0
  232. package/dist/dictionary/parser/fix-repository/repository-message.js.map +1 -0
  233. package/dist/dictionary/parser/fix-repository/repository-msg-content.d.ts +9 -0
  234. package/dist/dictionary/parser/fix-repository/repository-msg-content.js +3 -0
  235. package/dist/dictionary/parser/fix-repository/repository-msg-content.js.map +1 -0
  236. package/dist/dictionary/parser/fix-repository/repository-msg.d.ts +0 -0
  237. package/dist/dictionary/parser/fix-repository/repository-msg.js +1 -0
  238. package/dist/dictionary/parser/fix-repository/repository-msg.js.map +1 -0
  239. package/dist/dictionary/parser/fix-repository/repository-type.d.ts +0 -53
  240. package/dist/dictionary/parser/fix-repository/repository-type.js +0 -2
  241. package/dist/dictionary/parser/fix-repository/repository-type.js.map +1 -1
  242. package/dist/dictionary/parser/fix-repository/repository-xml-parser.js +10 -10
  243. package/dist/dictionary/parser/fix-repository/repository-xml-parser.js.map +1 -1
  244. package/dist/dictionary/parser/fix-repository/repository.d.ts +12 -1
  245. package/dist/dictionary/parser/fix-repository/repository.js +50 -28
  246. package/dist/dictionary/parser/fix-repository/repository.js.map +1 -1
  247. package/dist/dictionary/parser/fixml/components-parser.d.ts +1 -1
  248. package/dist/dictionary/parser/fixml/components-parser.js.map +1 -1
  249. package/dist/dictionary/parser/fixml/fields-parser.d.ts +1 -1
  250. package/dist/dictionary/parser/fixml/fields-parser.js.map +1 -1
  251. package/dist/dictionary/parser/fixml/fix-xsd-parser.js +3 -2
  252. package/dist/dictionary/parser/fixml/fix-xsd-parser.js.map +1 -1
  253. package/dist/dictionary/parser/fixml/include-graph.js.map +1 -1
  254. package/dist/dictionary/parser/fixml/xsd-parser.d.ts +1 -1
  255. package/dist/dictionary/parser/fixml/xsd-parser.js.map +1 -1
  256. package/dist/dictionary/parser/quickfix/field-definition-parser.d.ts +4 -4
  257. package/dist/dictionary/parser/quickfix/field-definition-parser.js +3 -3
  258. package/dist/dictionary/parser/quickfix/field-definition-parser.js.map +1 -1
  259. package/dist/dictionary/parser/quickfix/field-set-parser.d.ts +4 -4
  260. package/dist/dictionary/parser/quickfix/field-set-parser.js +3 -3
  261. package/dist/dictionary/parser/quickfix/field-set-parser.js.map +1 -1
  262. package/dist/dictionary/parser/quickfix/message-parser.d.ts +4 -4
  263. package/dist/dictionary/parser/quickfix/message-parser.js +3 -3
  264. package/dist/dictionary/parser/quickfix/message-parser.js.map +1 -1
  265. package/dist/dictionary/parser/quickfix/node-parser.d.ts +4 -5
  266. package/dist/dictionary/parser/quickfix/node-parser.js +4 -4
  267. package/dist/dictionary/parser/quickfix/node-parser.js.map +1 -1
  268. package/dist/dictionary/parser/quickfix/parse-state.d.ts +8 -0
  269. package/dist/dictionary/parser/quickfix/parse-state.js +13 -0
  270. package/dist/dictionary/parser/quickfix/parse-state.js.map +1 -0
  271. package/dist/dictionary/parser/quickfix/quick-fix-xml-file-parser.d.ts +1 -9
  272. package/dist/dictionary/parser/quickfix/quick-fix-xml-file-parser.js +28 -35
  273. package/dist/dictionary/parser/quickfix/quick-fix-xml-file-parser.js.map +1 -1
  274. package/dist/dictionary/sax-node.d.ts +6 -0
  275. package/dist/{header.js → dictionary/sax-node.js} +1 -1
  276. package/dist/dictionary/sax-node.js.map +1 -0
  277. package/dist/dictionary/set-reduce.d.ts +5 -12
  278. package/dist/dictionary/set-reduce.js +28 -26
  279. package/dist/dictionary/set-reduce.js.map +1 -1
  280. package/dist/dictionary/type-dispatcher.d.ts +12 -0
  281. package/dist/dictionary/type-dispatcher.js +3 -0
  282. package/dist/dictionary/type-dispatcher.js.map +1 -0
  283. package/dist/dictionary/version-util.d.ts +4 -0
  284. package/dist/dictionary/version-util.js +36 -0
  285. package/dist/dictionary/version-util.js.map +1 -0
  286. package/dist/execution-report.test.d.ts +0 -0
  287. package/dist/execution-report.test.js +1 -0
  288. package/dist/execution-report.test.js.map +1 -0
  289. package/dist/experiment.d.ts +0 -0
  290. package/dist/experiment.js +1 -0
  291. package/dist/experiment.js.map +1 -0
  292. package/dist/fix-repo-dict.test.d.ts +0 -0
  293. package/dist/fix-repo-dict.test.js +1 -0
  294. package/dist/fix-repo-dict.test.js.map +1 -0
  295. package/dist/fix-session-state-args.d.ts +0 -0
  296. package/dist/fix-session-state-args.js +1 -0
  297. package/dist/fix-session-state-args.js.map +1 -0
  298. package/dist/fix-session-state.d.ts +0 -0
  299. package/dist/fix-session-state.js +1 -0
  300. package/dist/fix-session-state.js.map +1 -0
  301. package/dist/fix-session.d.ts +0 -0
  302. package/dist/fix-session.js +1 -0
  303. package/dist/fix-session.js.map +1 -0
  304. package/dist/fix.txt +1 -1
  305. package/dist/fixml-alloc-parse.test.d.ts +0 -0
  306. package/dist/fixml-alloc-parse.test.js +1 -0
  307. package/dist/fixml-alloc-parse.test.js.map +1 -0
  308. package/dist/fixml-mkt-data-fut-parse.test.d.ts +0 -0
  309. package/dist/fixml-mkt-data-fut-parse.test.js +1 -0
  310. package/dist/fixml-mkt-data-fut-parse.test.js.map +1 -0
  311. package/dist/fixml-mkt-data-settle-parse.test.d.ts +0 -0
  312. package/dist/fixml-mkt-data-settle-parse.test.js +1 -0
  313. package/dist/fixml-mkt-data-settle-parse.test.js.map +1 -0
  314. package/dist/fixml-tc-bi-lateral-parse.test.d.ts +0 -0
  315. package/dist/fixml-tc-bi-lateral-parse.test.js +1 -0
  316. package/dist/fixml-tc-bi-lateral-parse.test.js.map +1 -0
  317. package/dist/includes.test.d.ts +0 -0
  318. package/dist/includes.test.js +1 -0
  319. package/dist/includes.test.js.map +1 -0
  320. package/dist/index.d.ts +1 -0
  321. package/dist/index.js +1 -0
  322. package/dist/index.js.map +1 -1
  323. package/dist/jsfix-cmd.d.ts +5 -0
  324. package/dist/jsfix-cmd.js +28 -21
  325. package/dist/jsfix-cmd.js.map +1 -1
  326. package/dist/launcher.d.ts +0 -0
  327. package/dist/launcher.js +1 -0
  328. package/dist/launcher.js.map +1 -0
  329. package/dist/logon.test.d.ts +0 -0
  330. package/dist/logon.test.js +1 -0
  331. package/dist/logon.test.js.map +1 -0
  332. package/dist/make-fix-session.d.ts +0 -0
  333. package/dist/make-fix-session.js +1 -0
  334. package/dist/make-fix-session.js.map +1 -0
  335. package/dist/memory-store.test.d.ts +0 -0
  336. package/dist/memory-store.test.js +1 -0
  337. package/dist/memory-store.test.js.map +1 -0
  338. package/dist/object.json +473 -698
  339. package/dist/qf-full-msg.test.d.ts +0 -0
  340. package/dist/qf-full-msg.test.js +1 -0
  341. package/dist/qf-full-msg.test.js.map +1 -0
  342. package/dist/repo-full-ascii-msg.test.d.ts +0 -0
  343. package/dist/repo-full-ascii-msg.test.js +1 -0
  344. package/dist/repo-full-ascii-msg.test.js.map +1 -0
  345. package/dist/runtime/DITokens.d.ts +20 -0
  346. package/dist/runtime/DITokens.js +25 -0
  347. package/dist/runtime/DITokens.js.map +1 -0
  348. package/dist/runtime/app-launcher.d.ts +27 -0
  349. package/dist/runtime/app-launcher.js +131 -0
  350. package/dist/runtime/app-launcher.js.map +1 -0
  351. package/dist/runtime/di-tokens.d.ts +28 -0
  352. package/dist/runtime/di-tokens.js +33 -0
  353. package/dist/runtime/di-tokens.js.map +1 -0
  354. package/dist/runtime/engine-factory.d.ts +4 -0
  355. package/dist/runtime/engine-factory.js +3 -0
  356. package/dist/runtime/engine-factory.js.map +1 -0
  357. package/dist/runtime/index.d.ts +5 -0
  358. package/dist/runtime/index.js +18 -0
  359. package/dist/runtime/index.js.map +1 -0
  360. package/dist/runtime/launcher.d.ts +29 -0
  361. package/dist/runtime/launcher.js +131 -0
  362. package/dist/runtime/launcher.js.map +1 -0
  363. package/dist/runtime/make-config.d.ts +11 -0
  364. package/dist/runtime/make-config.js +57 -0
  365. package/dist/runtime/make-config.js.map +1 -0
  366. package/dist/runtime/session-container.d.ts +16 -0
  367. package/dist/runtime/session-container.js +168 -0
  368. package/dist/runtime/session-container.js.map +1 -0
  369. package/dist/runtime/session-launcher.d.ts +26 -0
  370. package/dist/runtime/session-launcher.js +131 -0
  371. package/dist/runtime/session-launcher.js.map +1 -0
  372. package/dist/sample/http/oms/app.d.ts +1 -1
  373. package/dist/sample/http/oms/app.js +16 -12
  374. package/dist/sample/http/oms/app.js.map +1 -1
  375. package/dist/sample/http/oms/http-client.js +22 -2
  376. package/dist/sample/http/oms/http-client.js.map +1 -1
  377. package/dist/sample/http/oms/http-server.js +21 -2
  378. package/dist/sample/http/oms/http-server.js.map +1 -1
  379. package/dist/sample/launcher.d.ts +21 -3
  380. package/dist/sample/launcher.js +88 -11
  381. package/dist/sample/launcher.js.map +1 -1
  382. package/dist/sample/tcp/qf-md/app.d.ts +1 -1
  383. package/dist/sample/tcp/qf-md/app.js +11 -11
  384. package/dist/sample/tcp/qf-md/app.js.map +1 -1
  385. package/dist/sample/tcp/qf-md/md-client.js +21 -2
  386. package/dist/sample/tcp/qf-md/md-client.js.map +1 -1
  387. package/dist/sample/tcp/qf-md/md-server.js +20 -2
  388. package/dist/sample/tcp/qf-md/md-server.js.map +1 -1
  389. package/dist/sample/tcp/recovering-skeleton/app.d.ts +1 -1
  390. package/dist/sample/tcp/recovering-skeleton/app.js +36 -16
  391. package/dist/sample/tcp/recovering-skeleton/app.js.map +1 -1
  392. package/dist/sample/tcp/recovering-skeleton/respawn-acceptor.d.ts +3 -1
  393. package/dist/sample/tcp/recovering-skeleton/respawn-acceptor.js +30 -8
  394. package/dist/sample/tcp/recovering-skeleton/respawn-acceptor.js.map +1 -1
  395. package/dist/sample/tcp/recovering-skeleton/skeleton-client.d.ts +1 -1
  396. package/dist/sample/tcp/recovering-skeleton/skeleton-client.js +22 -3
  397. package/dist/sample/tcp/recovering-skeleton/skeleton-client.js.map +1 -1
  398. package/dist/sample/tcp/recovering-skeleton/skeleton-server.js +21 -2
  399. package/dist/sample/tcp/recovering-skeleton/skeleton-server.js.map +1 -1
  400. package/dist/sample/tcp/skeleton/app.d.ts +1 -1
  401. package/dist/sample/tcp/skeleton/app.js +8 -13
  402. package/dist/sample/tcp/skeleton/app.js.map +1 -1
  403. package/dist/sample/tcp/skeleton/skeleton-session.d.ts +5 -1
  404. package/dist/sample/tcp/skeleton/skeleton-session.js +45 -4
  405. package/dist/sample/tcp/skeleton/skeleton-session.js.map +1 -1
  406. package/dist/sample/tcp/tls-trade-capture/app.d.ts +1 -1
  407. package/dist/sample/tcp/tls-trade-capture/app.js +4 -24
  408. package/dist/sample/tcp/tls-trade-capture/app.js.map +1 -1
  409. package/dist/sample/tcp/trade-capture/app-launcher.d.ts +6 -0
  410. package/dist/sample/tcp/trade-capture/app-launcher.js +21 -0
  411. package/dist/sample/tcp/trade-capture/app-launcher.js.map +1 -0
  412. package/dist/sample/tcp/trade-capture/app-launher.d.ts +0 -0
  413. package/dist/sample/tcp/trade-capture/app-launher.js +1 -0
  414. package/dist/sample/tcp/trade-capture/app-launher.js.map +1 -0
  415. package/dist/sample/tcp/trade-capture/app.d.ts +1 -1
  416. package/dist/sample/tcp/trade-capture/app.js +4 -21
  417. package/dist/sample/tcp/trade-capture/app.js.map +1 -1
  418. package/dist/sample/tcp/trade-capture/jsfix.test_client.txt +11 -14
  419. package/dist/sample/tcp/trade-capture/jsfix.test_server.txt +10 -14
  420. package/dist/sample/tcp/trade-capture/trade-capture-client.d.ts +1 -0
  421. package/dist/sample/tcp/trade-capture/trade-capture-client.js +7 -3
  422. package/dist/sample/tcp/trade-capture/trade-capture-client.js.map +1 -1
  423. package/dist/sample/tcp/trade-capture/trade-capture-server.js.map +1 -1
  424. package/dist/sample/tcp/trade-capture/trade-factory.js +7 -1
  425. package/dist/sample/tcp/trade-capture/trade-factory.js.map +1 -1
  426. package/dist/segment-description.d.ts +0 -0
  427. package/dist/segment-description.js +1 -0
  428. package/dist/segment-description.js.map +1 -0
  429. package/dist/segment-summary.d.ts +0 -0
  430. package/dist/segment-summary.js +1 -0
  431. package/dist/segment-summary.js.map +1 -0
  432. package/dist/segment-type.d.ts +0 -0
  433. package/dist/segment-type.js +1 -0
  434. package/dist/segment-type.js.map +1 -0
  435. package/dist/session-description.d.ts +0 -0
  436. package/dist/session-description.js +1 -0
  437. package/dist/session-description.js.map +1 -0
  438. package/dist/session-msg-factory.d.ts +0 -0
  439. package/dist/session-msg-factory.js +1 -0
  440. package/dist/session-msg-factory.js.map +1 -0
  441. package/dist/session-state.d.ts +0 -0
  442. package/dist/session-state.js +1 -0
  443. package/dist/session-state.js.map +1 -0
  444. package/dist/session-state.test.d.ts +0 -0
  445. package/dist/session-state.test.js +1 -0
  446. package/dist/session-state.test.js.map +1 -0
  447. package/dist/session.test.d.ts +0 -0
  448. package/dist/session.test.js +1 -0
  449. package/dist/session.test.js.map +1 -0
  450. package/dist/setup.d.ts +0 -0
  451. package/dist/setup.js +1 -0
  452. package/dist/setup.js.map +1 -0
  453. package/dist/skeleton-runner.d.ts +0 -0
  454. package/dist/skeleton-runner.js +1 -0
  455. package/dist/skeleton-runner.js.map +1 -0
  456. package/dist/store/fix-msg-ascii-store-resend.d.ts +3 -2
  457. package/dist/store/fix-msg-ascii-store-resend.js +30 -21
  458. package/dist/store/fix-msg-ascii-store-resend.js.map +1 -1
  459. package/dist/store/fix-msg-memory-store.d.ts +11 -8
  460. package/dist/store/fix-msg-memory-store.js +108 -42
  461. package/dist/store/fix-msg-memory-store.js.map +1 -1
  462. package/dist/store/fix-msg-store-record.d.ts +4 -0
  463. package/dist/store/fix-msg-store-record.js +7 -0
  464. package/dist/store/fix-msg-store-record.js.map +1 -1
  465. package/dist/store/fix-msg-store-state.d.ts +6 -0
  466. package/dist/store/fix-msg-store-state.js +3 -0
  467. package/dist/store/fix-msg-store-state.js.map +1 -0
  468. package/dist/store/fix-msg-store.d.ts +8 -9
  469. package/dist/store/fix-msg-store.js.map +1 -1
  470. package/dist/structure.json +225 -485
  471. package/dist/tag-pos.d.ts +0 -0
  472. package/dist/tag-pos.js +1 -0
  473. package/dist/tag-pos.js.map +1 -0
  474. package/dist/tag-type.d.ts +0 -0
  475. package/dist/tag-type.js +1 -0
  476. package/dist/tag-type.js.map +1 -0
  477. package/dist/tags.d.ts +0 -0
  478. package/dist/tags.js +1 -0
  479. package/dist/tags.js.map +1 -0
  480. package/dist/test/ascii/ascii-encoder.test.d.ts +1 -0
  481. package/dist/test/ascii/ascii-encoder.test.js +507 -0
  482. package/dist/test/ascii/ascii-encoder.test.js.map +1 -0
  483. package/dist/test/ascii/ascii-parser.test.d.ts +1 -0
  484. package/dist/test/ascii/ascii-parser.test.js +123 -0
  485. package/dist/test/ascii/ascii-parser.test.js.map +1 -0
  486. package/dist/test/ascii/ascii-segment.test.d.ts +1 -0
  487. package/dist/test/ascii/ascii-segment.test.js +86 -0
  488. package/dist/test/ascii/ascii-segment.test.js.map +1 -0
  489. package/dist/test/ascii/ascii-store-replay.test.d.ts +1 -0
  490. package/dist/test/ascii/ascii-store-replay.test.js +92 -0
  491. package/dist/test/ascii/ascii-store-replay.test.js.map +1 -0
  492. package/dist/test/ascii/ascii-tag-pos.test.d.ts +1 -0
  493. package/dist/test/ascii/ascii-tag-pos.test.js +105 -0
  494. package/dist/test/ascii/ascii-tag-pos.test.js.map +1 -0
  495. package/dist/test/ascii/execution-report.test.d.ts +1 -0
  496. package/dist/test/ascii/execution-report.test.js +489 -0
  497. package/dist/test/ascii/execution-report.test.js.map +1 -0
  498. package/dist/test/ascii/fix-log-replay.test.d.ts +1 -0
  499. package/dist/test/{memory-store-test.js → ascii/fix-log-replay.test.js} +11 -23
  500. package/dist/test/ascii/fix-log-replay.test.js.map +1 -0
  501. package/dist/test/ascii/fix-repo-dict.test.d.ts +1 -0
  502. package/dist/test/ascii/fix-repo-dict.test.js +128 -0
  503. package/dist/test/ascii/fix-repo-dict.test.js.map +1 -0
  504. package/dist/test/ascii/includes.test.d.ts +1 -0
  505. package/dist/test/ascii/includes.test.js +43 -0
  506. package/dist/test/ascii/includes.test.js.map +1 -0
  507. package/dist/test/ascii/logon.test.d.ts +1 -0
  508. package/dist/test/ascii/logon.test.js +91 -0
  509. package/dist/test/ascii/logon.test.js.map +1 -0
  510. package/dist/test/ascii/memory-store.test.d.ts +1 -0
  511. package/dist/test/ascii/memory-store.test.js +75 -0
  512. package/dist/test/ascii/memory-store.test.js.map +1 -0
  513. package/dist/test/ascii/qf-full-msg.test.d.ts +1 -0
  514. package/dist/test/ascii/qf-full-msg.test.js +81 -0
  515. package/dist/test/ascii/qf-full-msg.test.js.map +1 -0
  516. package/dist/test/ascii/repo-full-ascii-msg.test.d.ts +1 -0
  517. package/dist/test/ascii/repo-full-ascii-msg.test.js +87 -0
  518. package/dist/test/ascii/repo-full-ascii-msg.test.js.map +1 -0
  519. package/dist/test/ascii/session-state.test.d.ts +1 -0
  520. package/dist/test/ascii/session-state.test.js +73 -0
  521. package/dist/test/ascii/session-state.test.js.map +1 -0
  522. package/dist/test/ascii/session.test.d.ts +1 -0
  523. package/dist/test/ascii/session.test.js +280 -0
  524. package/dist/test/ascii/session.test.js.map +1 -0
  525. package/dist/test/ascii/time-formatter.test.d.ts +1 -0
  526. package/dist/test/ascii/time-formatter.test.js +80 -0
  527. package/dist/test/ascii/time-formatter.test.js.map +1 -0
  528. package/dist/test/ascii/view-decode.test.d.ts +1 -0
  529. package/dist/test/ascii/view-decode.test.js +183 -0
  530. package/dist/test/ascii/view-decode.test.js.map +1 -0
  531. package/dist/test/ascii-encoder.test.d.ts +1 -0
  532. package/dist/test/{ascii-encode.test.js → ascii-encoder.test.js} +140 -48
  533. package/dist/test/ascii-encoder.test.js.map +1 -0
  534. package/dist/test/ascii-parser.test.d.ts +1 -1
  535. package/dist/test/ascii-parser.test.js +31 -48
  536. package/dist/test/ascii-parser.test.js.map +1 -1
  537. package/dist/test/ascii-segment.test.d.ts +1 -1
  538. package/dist/test/ascii-segment.test.js +19 -39
  539. package/dist/test/ascii-segment.test.js.map +1 -1
  540. package/dist/test/ascii-store-replay.test.d.ts +1 -1
  541. package/dist/test/ascii-store-replay.test.js +32 -44
  542. package/dist/test/ascii-store-replay.test.js.map +1 -1
  543. package/dist/test/ascii-tag-pos.test.d.ts +1 -1
  544. package/dist/test/ascii-tag-pos.test.js +8 -8
  545. package/dist/test/ascii-tag-pos.test.js.map +1 -1
  546. package/dist/test/elastic-buffer.test.d.ts +1 -1
  547. package/dist/test/elastic-buffer.test.js +3 -1
  548. package/dist/test/elastic-buffer.test.js.map +1 -1
  549. package/dist/test/encode-proxy.test.d.ts +1 -1
  550. package/dist/test/encode-proxy.test.js +9 -9
  551. package/dist/test/encode-proxy.test.js.map +1 -1
  552. package/dist/test/env/experiment.d.ts +23 -0
  553. package/dist/test/env/experiment.js +33 -0
  554. package/dist/test/env/experiment.js.map +1 -0
  555. package/dist/test/env/parsing-result.d.ts +10 -0
  556. package/dist/test/env/parsing-result.js +14 -0
  557. package/dist/test/env/parsing-result.js.map +1 -0
  558. package/dist/test/env/setup.d.ts +39 -0
  559. package/dist/test/env/setup.js +98 -0
  560. package/dist/test/env/setup.js.map +1 -0
  561. package/dist/test/env/skeleton-runner.d.ts +15 -0
  562. package/dist/test/env/skeleton-runner.js +108 -0
  563. package/dist/test/env/skeleton-runner.js.map +1 -0
  564. package/dist/test/env/test-recovery.d.ts +13 -0
  565. package/dist/test/env/test-recovery.js +41 -0
  566. package/dist/test/env/test-recovery.js.map +1 -0
  567. package/dist/test/env/to-views.d.ts +11 -0
  568. package/dist/test/env/to-views.js +56 -0
  569. package/dist/test/env/to-views.js.map +1 -0
  570. package/dist/test/execution-report.test.d.ts +1 -1
  571. package/dist/test/execution-report.test.js +53 -49
  572. package/dist/test/execution-report.test.js.map +1 -1
  573. package/dist/test/experiment.d.ts +23 -0
  574. package/dist/test/experiment.js +33 -0
  575. package/dist/test/experiment.js.map +1 -0
  576. package/dist/test/expieriment.d.ts +23 -0
  577. package/dist/test/expieriment.js +33 -0
  578. package/dist/test/expieriment.js.map +1 -0
  579. package/dist/test/fix-log-replay.test.d.ts +1 -1
  580. package/dist/test/fix-log-replay.test.js +7 -5
  581. package/dist/test/fix-log-replay.test.js.map +1 -1
  582. package/dist/test/fix-repo-dict.test.d.ts +1 -1
  583. package/dist/test/fix-repo-dict.test.js +6 -5
  584. package/dist/test/fix-repo-dict.test.js.map +1 -1
  585. package/dist/test/fixml/fixml-alloc-parse.test.d.ts +1 -0
  586. package/dist/test/fixml/fixml-alloc-parse.test.js +161 -0
  587. package/dist/test/fixml/fixml-alloc-parse.test.js.map +1 -0
  588. package/dist/test/fixml/fixml-mkt-data-fut-parse.test.d.ts +1 -0
  589. package/dist/test/fixml/fixml-mkt-data-fut-parse.test.js +61 -0
  590. package/dist/test/fixml/fixml-mkt-data-fut-parse.test.js.map +1 -0
  591. package/dist/test/fixml/fixml-mkt-data-settle-parse.test.d.ts +1 -0
  592. package/dist/test/fixml/fixml-mkt-data-settle-parse.test.js +34 -0
  593. package/dist/test/fixml/fixml-mkt-data-settle-parse.test.js.map +1 -0
  594. package/dist/test/fixml/fixml-tc-bi-lateral-parse.test.d.ts +1 -0
  595. package/dist/test/fixml/fixml-tc-bi-lateral-parse.test.js +97 -0
  596. package/dist/test/fixml/fixml-tc-bi-lateral-parse.test.js.map +1 -0
  597. package/dist/test/fixml/repo-full-fixml-msg.test.d.ts +1 -0
  598. package/dist/test/fixml/repo-full-fixml-msg.test.js +143 -0
  599. package/dist/test/fixml/repo-full-fixml-msg.test.js.map +1 -0
  600. package/dist/test/fixml-alloc-parse.test.d.ts +1 -1
  601. package/dist/test/fixml-alloc-parse.test.js +2 -1
  602. package/dist/test/fixml-alloc-parse.test.js.map +1 -1
  603. package/dist/test/fixml-mkt-data-fut-parse.test.d.ts +1 -1
  604. package/dist/test/fixml-mkt-data-fut-parse.test.js +2 -1
  605. package/dist/test/fixml-mkt-data-fut-parse.test.js.map +1 -1
  606. package/dist/test/fixml-mkt-data-settle-parse.test.d.ts +1 -1
  607. package/dist/test/fixml-mkt-data-settle-parse.test.js +2 -1
  608. package/dist/test/fixml-mkt-data-settle-parse.test.js.map +1 -1
  609. package/dist/test/fixml-tc-bi-lateral-parse.test.d.ts +1 -1
  610. package/dist/test/fixml-tc-bi-lateral-parse.test.js +2 -1
  611. package/dist/test/fixml-tc-bi-lateral-parse.test.js.map +1 -1
  612. package/dist/test/includes.test.d.ts +1 -1
  613. package/dist/test/includes.test.js +1 -0
  614. package/dist/test/includes.test.js.map +1 -1
  615. package/dist/test/logon.test.d.ts +1 -1
  616. package/dist/test/logon.test.js +11 -11
  617. package/dist/test/logon.test.js.map +1 -1
  618. package/dist/test/memory-store.test.d.ts +1 -1
  619. package/dist/test/memory-store.test.js +35 -27
  620. package/dist/test/memory-store.test.js.map +1 -1
  621. package/dist/test/qf-full-msg.test.d.ts +1 -1
  622. package/dist/test/qf-full-msg.test.js +25 -19
  623. package/dist/test/qf-full-msg.test.js.map +1 -1
  624. package/dist/test/repo-full-ascii-msg.test.d.ts +1 -1
  625. package/dist/test/repo-full-ascii-msg.test.js +28 -22
  626. package/dist/test/repo-full-ascii-msg.test.js.map +1 -1
  627. package/dist/test/repo-full-fixml-msg.test.d.ts +1 -1
  628. package/dist/test/repo-full-fixml-msg.test.js +21 -18
  629. package/dist/test/repo-full-fixml-msg.test.js.map +1 -1
  630. package/dist/test/session-state.test.d.ts +1 -1
  631. package/dist/test/session-state.test.js +2 -1
  632. package/dist/test/session-state.test.js.map +1 -1
  633. package/dist/test/session.test.d.ts +1 -1
  634. package/dist/test/session.test.js +152 -163
  635. package/dist/test/session.test.js.map +1 -1
  636. package/dist/test/setup.d.ts +45 -0
  637. package/dist/test/setup.js +102 -0
  638. package/dist/test/setup.js.map +1 -0
  639. package/dist/test/skeleton-runner.d.ts +15 -0
  640. package/dist/test/skeleton-runner.js +108 -0
  641. package/dist/test/skeleton-runner.js.map +1 -0
  642. package/dist/test/time-formatter.test.d.ts +1 -1
  643. package/dist/test/time-formatter.test.js +3 -1
  644. package/dist/test/time-formatter.test.js.map +1 -1
  645. package/dist/test/to-views.d.ts +1 -1
  646. package/dist/test/to-views.js +5 -4
  647. package/dist/test/to-views.js.map +1 -1
  648. package/dist/test/view-decode.test.d.ts +1 -1
  649. package/dist/test/view-decode.test.js +9 -33
  650. package/dist/test/view-decode.test.js.map +1 -1
  651. package/dist/time-formatter.test.d.ts +0 -0
  652. package/dist/time-formatter.test.js +1 -0
  653. package/dist/time-formatter.test.js.map +1 -0
  654. package/dist/to-views.d.ts +0 -0
  655. package/dist/to-views.js +1 -0
  656. package/dist/to-views.js.map +1 -0
  657. package/dist/token.txt +246 -308
  658. package/dist/transport/FixEntity.d.ts +8 -0
  659. package/dist/transport/FixEntity.js +12 -0
  660. package/dist/transport/FixEntity.js.map +1 -0
  661. package/dist/transport/a-session-msg-factory.d.ts +23 -0
  662. package/dist/transport/a-session-msg-factory.js +58 -0
  663. package/dist/transport/a-session-msg-factory.js.map +1 -0
  664. package/dist/transport/ascii/ascii-msg-transmitter.js +50 -12
  665. package/dist/transport/ascii/ascii-msg-transmitter.js.map +1 -1
  666. package/dist/transport/ascii/ascii-session-msg-factory.d.ts +16 -0
  667. package/dist/transport/ascii/ascii-session-msg-factory.js +47 -0
  668. package/dist/transport/ascii/ascii-session-msg-factory.js.map +1 -0
  669. package/dist/transport/ascii/ascii-session.d.ts +10 -1
  670. package/dist/transport/ascii/ascii-session.js +98 -41
  671. package/dist/transport/ascii/ascii-session.js.map +1 -1
  672. package/dist/transport/ascii/index.d.ts +1 -1
  673. package/dist/transport/ascii/index.js +1 -1
  674. package/dist/transport/ascii/index.js.map +1 -1
  675. package/dist/transport/duplex/http-duplex.d.ts +1 -1
  676. package/dist/transport/duplex/http-duplex.js +2 -2
  677. package/dist/transport/duplex/http-duplex.js.map +1 -1
  678. package/dist/transport/duplex/tcp-duplex.js +22 -2
  679. package/dist/transport/duplex/tcp-duplex.js.map +1 -1
  680. package/dist/transport/factory/index.d.ts +1 -0
  681. package/dist/{sample/tcp/trade_capture → transport/factory}/index.js +1 -2
  682. package/dist/transport/factory/index.js.map +1 -0
  683. package/dist/transport/{msg-transport.d.ts → factory/msg-transport.d.ts} +4 -4
  684. package/dist/transport/factory/msg-transport.js +61 -0
  685. package/dist/transport/factory/msg-transport.js.map +1 -0
  686. package/dist/transport/fix-acceptor.d.ts +2 -2
  687. package/dist/transport/fix-acceptor.js.map +1 -1
  688. package/dist/transport/fix-entity.d.ts +8 -0
  689. package/dist/transport/fix-entity.js +12 -0
  690. package/dist/transport/fix-entity.js.map +1 -0
  691. package/dist/transport/fix-initiator.d.ts +2 -2
  692. package/dist/transport/fix-initiator.js.map +1 -1
  693. package/dist/transport/fix-msg-factory.d.ts +1 -1
  694. package/dist/transport/fix-msg-factory.js.map +1 -1
  695. package/dist/transport/fix-session-state-args.d.ts +8 -0
  696. package/dist/transport/fix-session-state-args.js +3 -0
  697. package/dist/transport/fix-session-state-args.js.map +1 -0
  698. package/dist/transport/fix-session-state.d.ts +8 -38
  699. package/dist/transport/fix-session-state.js +26 -56
  700. package/dist/transport/fix-session-state.js.map +1 -1
  701. package/dist/transport/fix-session.d.ts +9 -2
  702. package/dist/transport/fix-session.js +115 -59
  703. package/dist/transport/fix-session.js.map +1 -1
  704. package/dist/transport/fixml/fixml-msg-transmitter.js +23 -5
  705. package/dist/transport/fixml/fixml-msg-transmitter.js.map +1 -1
  706. package/dist/transport/fixml/fixml-session-msg-factory.d.ts +13 -0
  707. package/dist/transport/fixml/fixml-session-msg-factory.js +68 -0
  708. package/dist/transport/fixml/fixml-session-msg-factory.js.map +1 -0
  709. package/dist/transport/fixml/fixml-session.d.ts +1 -1
  710. package/dist/transport/fixml/fixml-session.js +3 -3
  711. package/dist/transport/fixml/fixml-session.js.map +1 -1
  712. package/dist/transport/fixml/index.d.ts +1 -2
  713. package/dist/transport/fixml/index.js +1 -2
  714. package/dist/transport/fixml/index.js.map +1 -1
  715. package/dist/transport/http/html-options.d.ts +8 -0
  716. package/dist/{hop_no_hops.js → transport/http/html-options.js} +1 -1
  717. package/dist/transport/http/html-options.js.map +1 -0
  718. package/dist/transport/http/html-route.d.ts +5 -0
  719. package/dist/{hop.js → transport/http/html-route.js} +1 -1
  720. package/dist/transport/http/html-route.js.map +1 -0
  721. package/dist/transport/http/http-acceptor-listener.d.ts +7 -0
  722. package/dist/transport/http/http-acceptor-listener.js +68 -0
  723. package/dist/transport/http/http-acceptor-listener.js.map +1 -0
  724. package/dist/transport/http/http-acceptor.js +31 -11
  725. package/dist/transport/http/http-acceptor.js.map +1 -1
  726. package/dist/transport/http/http-adapter.d.ts +7 -0
  727. package/dist/{trailer.js → transport/http/http-adapter.js} +1 -1
  728. package/dist/transport/http/http-adapter.js.map +1 -0
  729. package/dist/transport/http/http-initiator.d.ts +9 -3
  730. package/dist/transport/http/http-initiator.js +57 -26
  731. package/dist/transport/http/http-initiator.js.map +1 -1
  732. package/dist/transport/http/http-json-sample-adapter.d.ts +2 -1
  733. package/dist/transport/http/http-json-sample-adapter.js +21 -2
  734. package/dist/transport/http/http-json-sample-adapter.js.map +1 -1
  735. package/dist/transport/http/http-transaction.d.ts +1 -1
  736. package/dist/transport/http/http-transaction.js.map +1 -1
  737. package/dist/transport/http/http-transport-description.d.ts +8 -0
  738. package/dist/transport/http/http-transport-description.js +3 -0
  739. package/dist/transport/http/http-transport-description.js.map +1 -0
  740. package/dist/transport/http/index.d.ts +1 -0
  741. package/dist/transport/http/index.js +1 -0
  742. package/dist/transport/http/index.js.map +1 -1
  743. package/dist/transport/index.d.ts +11 -10
  744. package/dist/transport/index.js +11 -10
  745. package/dist/transport/index.js.map +1 -1
  746. package/dist/transport/{make-fixl-session.d.ts → make-fix-session.d.ts} +0 -0
  747. package/dist/transport/make-fix-session.js +3 -0
  748. package/dist/transport/make-fix-session.js.map +1 -0
  749. package/dist/transport/msg-application.d.ts +12 -0
  750. package/dist/transport/msg-application.js +3 -0
  751. package/dist/transport/msg-application.js.map +1 -0
  752. package/dist/transport/msg-transmitter.d.ts +5 -5
  753. package/dist/transport/msg-transmitter.js +2 -3
  754. package/dist/transport/msg-transmitter.js.map +1 -1
  755. package/dist/transport/session/a-session-msg-factory.d.ts +23 -0
  756. package/dist/transport/session/a-session-msg-factory.js +58 -0
  757. package/dist/transport/session/a-session-msg-factory.js.map +1 -0
  758. package/dist/transport/session/fix-session-state-args.d.ts +8 -0
  759. package/dist/transport/session/fix-session-state-args.js +3 -0
  760. package/dist/transport/session/fix-session-state-args.js.map +1 -0
  761. package/dist/transport/session/fix-session-state.d.ts +32 -0
  762. package/dist/transport/session/fix-session-state.js +133 -0
  763. package/dist/transport/session/fix-session-state.js.map +1 -0
  764. package/dist/transport/session/fix-session.d.ts +50 -0
  765. package/dist/transport/session/fix-session.js +291 -0
  766. package/dist/transport/session/fix-session.js.map +1 -0
  767. package/dist/transport/session/make-fix-session.d.ts +5 -0
  768. package/dist/transport/session/make-fix-session.js +3 -0
  769. package/dist/transport/session/make-fix-session.js.map +1 -0
  770. package/dist/transport/session/session-description.d.ts +17 -0
  771. package/dist/transport/session/session-description.js +3 -0
  772. package/dist/transport/session/session-description.js.map +1 -0
  773. package/dist/transport/session/session-msg-factory.d.ts +15 -0
  774. package/dist/transport/session/session-msg-factory.js +3 -0
  775. package/dist/transport/session/session-msg-factory.js.map +1 -0
  776. package/dist/transport/session/session-state.d.ts +25 -0
  777. package/dist/transport/session/session-state.js +30 -0
  778. package/dist/transport/session/session-state.js.map +1 -0
  779. package/dist/transport/session-description.d.ts +1 -48
  780. package/dist/transport/session-description.js.map +1 -1
  781. package/dist/transport/session-msg-factory.d.ts +7 -20
  782. package/dist/transport/session-msg-factory.js +0 -150
  783. package/dist/transport/session-msg-factory.js.map +1 -1
  784. package/dist/transport/session-state.d.ts +25 -0
  785. package/dist/transport/session-state.js +30 -0
  786. package/dist/transport/session-state.js.map +1 -0
  787. package/dist/transport/tcp/index.d.ts +3 -2
  788. package/dist/transport/tcp/index.js +3 -2
  789. package/dist/transport/tcp/index.js.map +1 -1
  790. package/dist/transport/tcp/recovering-tcp-initiator.d.ts +7 -9
  791. package/dist/transport/tcp/recovering-tcp-initiator.js +41 -16
  792. package/dist/transport/tcp/recovering-tcp-initiator.js.map +1 -1
  793. package/dist/transport/tcp/tcp-acceptor-listener.d.ts +7 -0
  794. package/dist/transport/tcp/tcp-acceptor-listener.js +70 -0
  795. package/dist/transport/tcp/tcp-acceptor-listener.js.map +1 -0
  796. package/dist/transport/tcp/tcp-acceptor.d.ts +7 -0
  797. package/dist/transport/tcp/tcp-acceptor.js +79 -43
  798. package/dist/transport/tcp/tcp-acceptor.js.map +1 -1
  799. package/dist/transport/tcp/tcp-initiator-connector.d.ts +10 -0
  800. package/dist/transport/tcp/tcp-initiator-connector.js +97 -0
  801. package/dist/transport/tcp/tcp-initiator-connector.js.map +1 -0
  802. package/dist/transport/tcp/tcp-initiator.d.ts +4 -2
  803. package/dist/transport/tcp/tcp-initiator.js +82 -36
  804. package/dist/transport/tcp/tcp-initiator.js.map +1 -1
  805. package/dist/transport/tcp/tcp-transport-description.d.ts +6 -0
  806. package/dist/transport/tcp/tcp-transport-description.js +3 -0
  807. package/dist/transport/tcp/tcp-transport-description.js.map +1 -0
  808. package/dist/transport/tcp/tls-options-factory.d.ts +9 -0
  809. package/dist/transport/tcp/tls-options-factory.js +53 -0
  810. package/dist/transport/tcp/tls-options-factory.js.map +1 -0
  811. package/dist/transport/tcp/tls-options.d.ts +10 -5
  812. package/dist/transport/tcp/tls-options.js +0 -49
  813. package/dist/transport/tcp/tls-options.js.map +1 -1
  814. package/dist/transport/tick-action.d.ts +8 -0
  815. package/dist/transport/tick-action.js +13 -0
  816. package/dist/transport/tick-action.js.map +1 -0
  817. package/dist/types/FIX4.4/repo/enum/all-enum.js.map +1 -1
  818. package/dist/util/buffer-helper.js +1 -1
  819. package/dist/util/buffer-helper.js.map +1 -1
  820. package/dist/util/definition-factory.d.ts +10 -0
  821. package/dist/util/definition-factory.js +56 -0
  822. package/dist/util/definition-factory.js.map +1 -0
  823. package/dist/util/dictionary-path.d.ts +4 -0
  824. package/dist/util/dictionary-path.js +3 -0
  825. package/dist/util/dictionary-path.js.map +1 -0
  826. package/dist/util/index.d.ts +1 -1
  827. package/dist/util/index.js +1 -1
  828. package/dist/util/index.js.map +1 -1
  829. package/dist/util/json-helper.d.ts +3 -1
  830. package/dist/util/json-helper.js +13 -12
  831. package/dist/util/json-helper.js.map +1 -1
  832. package/dist/util/message-generator.d.ts +1 -1
  833. package/dist/util/message-generator.js +16 -15
  834. package/dist/util/message-generator.js.map +1 -1
  835. package/dist/util/replay.d.ts +6 -3
  836. package/dist/util/replay.js +24 -26
  837. package/dist/util/replay.js.map +1 -1
  838. package/package.json +27 -20
  839. package/script/build.cmd +1 -0
  840. package/script/build.sh +2 -0
  841. package/script/genkey.ps1 +179 -179
  842. package/script/test.cmd +3 -0
  843. package/src/buffer/{ascii-chars.ts → ascii/ascii-chars.ts} +0 -0
  844. package/src/buffer/ascii/ascii-encoder.ts +80 -38
  845. package/src/buffer/ascii/ascii-parser-state.ts +7 -12
  846. package/src/buffer/ascii/ascii-parser.ts +23 -16
  847. package/src/buffer/ascii/ascii-segment-parser.ts +14 -8
  848. package/src/buffer/ascii/ascii-view.ts +4 -9
  849. package/src/buffer/ascii/index.ts +1 -0
  850. package/src/buffer/ascii/parse-state.ts +8 -0
  851. package/src/buffer/ascii/time-formatter.ts +3 -3
  852. package/src/buffer/elastic-buffer.ts +7 -2
  853. package/src/buffer/encode-proxy.ts +10 -5
  854. package/src/buffer/fixml/fixml-encoder.ts +15 -11
  855. package/src/buffer/fixml/fixml-parser.ts +16 -6
  856. package/src/buffer/fixml/fixml-view.ts +4 -4
  857. package/src/buffer/fixml/populated-attributes.ts +6 -0
  858. package/src/buffer/index.ts +4 -8
  859. package/src/buffer/msg-encoder.ts +2 -1
  860. package/src/buffer/msg-view.ts +13 -6
  861. package/src/buffer/{segment-description.ts → segment/segment-description.ts} +4 -11
  862. package/src/buffer/{segment-summary.ts → segment/segment-summary.ts} +0 -0
  863. package/src/buffer/segment/segment-type.ts +8 -0
  864. package/src/buffer/structure.ts +3 -3
  865. package/src/buffer/{tag-pos.ts → tag/tag-pos.ts} +0 -0
  866. package/src/buffer/tag/tag-type.ts +13 -0
  867. package/src/buffer/{tags.ts → tag/tags.ts} +4 -16
  868. package/src/config/get-js-fx-logger.ts +4 -0
  869. package/src/config/index.ts +1 -0
  870. package/src/config/js-fix-config.ts +5 -2
  871. package/src/config/js-fix-logger.ts +0 -3
  872. package/src/dictionary/compiler/compiler-type.ts +3 -3
  873. package/src/dictionary/compiler/enum-compiler.ts +12 -1
  874. package/src/dictionary/compiler/msg-compiler.ts +8 -7
  875. package/src/dictionary/contained/contained-component-field.ts +2 -1
  876. package/src/dictionary/contained/contained-field-dispatch.ts +3 -7
  877. package/src/dictionary/contained/contained-field-dispatcher.ts +9 -0
  878. package/src/dictionary/contained/contained-field-set.ts +5 -3
  879. package/src/dictionary/contained/contained-field-type.ts +5 -0
  880. package/src/dictionary/contained/contained-field.ts +1 -6
  881. package/src/dictionary/contained/contained-group-field.ts +2 -1
  882. package/src/dictionary/contained/contained-simple-field.ts +2 -1
  883. package/src/dictionary/contained/field-dispatcher.ts +9 -0
  884. package/src/dictionary/contained/fields-dispatch.ts +46 -0
  885. package/src/dictionary/contained/index.ts +2 -0
  886. package/src/dictionary/contained-set-type.ts +5 -0
  887. package/src/dictionary/definition/component-field-definition.ts +1 -1
  888. package/src/dictionary/definition/fix-definitions.ts +2 -1
  889. package/src/dictionary/definition/group-field-definition.ts +1 -1
  890. package/src/dictionary/definition/index.ts +0 -1
  891. package/src/dictionary/definition/message-definition.ts +1 -1
  892. package/src/dictionary/definition/simple-field-definition.ts +3 -1
  893. package/src/dictionary/dict-primitive.ts +0 -13
  894. package/src/dictionary/fix-definition-source.ts +6 -0
  895. package/src/dictionary/fix-versions.ts +0 -32
  896. package/src/dictionary/index.ts +1 -5
  897. package/src/dictionary/parser/fix-repository/abbreviations-parser.ts +2 -3
  898. package/src/dictionary/parser/fix-repository/base-parser.ts +2 -3
  899. package/src/dictionary/parser/fix-repository/components-parser.ts +2 -3
  900. package/src/dictionary/parser/fix-repository/data-types-parser.ts +2 -3
  901. package/src/dictionary/parser/fix-repository/enums-parser.ts +2 -3
  902. package/src/dictionary/parser/fix-repository/fields-parser.ts +2 -3
  903. package/src/dictionary/parser/fix-repository/messages-parser.ts +2 -3
  904. package/src/dictionary/parser/fix-repository/msg-contents-parser.ts +2 -3
  905. package/src/dictionary/parser/fix-repository/repository-abbreviation.ts +6 -0
  906. package/src/dictionary/parser/fix-repository/repository-component.ts +11 -0
  907. package/src/dictionary/parser/fix-repository/repository-data-type.ts +7 -0
  908. package/src/dictionary/parser/fix-repository/repository-enum.ts +8 -0
  909. package/src/dictionary/parser/fix-repository/repository-field.ts +12 -0
  910. package/src/dictionary/parser/fix-repository/repository-message.ts +12 -0
  911. package/src/dictionary/parser/fix-repository/repository-msg-content.ts +10 -0
  912. package/src/dictionary/parser/fix-repository/repository-type.ts +0 -59
  913. package/src/dictionary/parser/fix-repository/repository-xml-parser.ts +10 -9
  914. package/src/dictionary/parser/fix-repository/repository.ts +69 -38
  915. package/src/dictionary/parser/fixml/components-parser.ts +6 -3
  916. package/src/dictionary/parser/fixml/fields-parser.ts +1 -1
  917. package/src/dictionary/parser/fixml/fix-xsd-parser.ts +2 -1
  918. package/src/dictionary/parser/fixml/include-graph.ts +2 -1
  919. package/src/dictionary/parser/fixml/xsd-parser.ts +2 -1
  920. package/src/dictionary/parser/quickfix/field-definition-parser.ts +4 -5
  921. package/src/dictionary/parser/quickfix/field-set-parser.ts +4 -5
  922. package/src/dictionary/parser/quickfix/message-parser.ts +4 -5
  923. package/src/dictionary/parser/quickfix/node-parser.ts +3 -6
  924. package/src/dictionary/parser/quickfix/parse-state.ts +8 -0
  925. package/src/dictionary/parser/quickfix/quick-fix-xml-file-parser.ts +9 -15
  926. package/src/dictionary/sax-node.ts +7 -0
  927. package/src/dictionary/set-reduce.ts +30 -31
  928. package/src/dictionary/type-dispatcher.ts +7 -0
  929. package/src/dictionary/version-util.ts +25 -0
  930. package/src/index.ts +1 -0
  931. package/src/jsfix-cmd.ts +31 -16
  932. package/src/runtime/di-tokens.ts +48 -0
  933. package/src/runtime/engine-factory.ts +5 -0
  934. package/src/runtime/index.ts +5 -0
  935. package/src/runtime/make-config.ts +35 -0
  936. package/src/runtime/session-container.ts +180 -0
  937. package/src/runtime/session-launcher.ts +127 -0
  938. package/src/sample/http/oms/app.ts +20 -12
  939. package/src/sample/http/oms/http-client.ts +5 -2
  940. package/src/sample/http/oms/http-server.ts +5 -1
  941. package/src/sample/tcp/qf-md/app.ts +12 -12
  942. package/src/sample/tcp/qf-md/md-client.ts +4 -1
  943. package/src/sample/tcp/qf-md/md-server.ts +3 -1
  944. package/src/sample/tcp/recovering-skeleton/app.ts +37 -15
  945. package/src/sample/tcp/recovering-skeleton/respawn-acceptor.ts +16 -9
  946. package/src/sample/tcp/recovering-skeleton/skeleton-client.ts +4 -2
  947. package/src/sample/tcp/recovering-skeleton/skeleton-server.ts +4 -2
  948. package/src/sample/tcp/skeleton/app.ts +10 -15
  949. package/src/sample/tcp/skeleton/skeleton-session.ts +29 -3
  950. package/src/sample/tcp/tls-trade-capture/app.ts +8 -31
  951. package/src/sample/tcp/trade-capture/app-launcher.ts +22 -0
  952. package/src/sample/tcp/trade-capture/app.ts +3 -26
  953. package/src/sample/tcp/trade-capture/trade-capture-client.ts +10 -4
  954. package/src/sample/tcp/trade-capture/trade-capture-server.ts +2 -1
  955. package/src/sample/tcp/trade-capture/trade-factory.ts +7 -1
  956. package/src/store/fix-msg-ascii-store-resend.ts +38 -26
  957. package/src/store/fix-msg-memory-store.ts +105 -42
  958. package/src/store/fix-msg-store-record.ts +11 -0
  959. package/src/store/fix-msg-store-state.ts +6 -0
  960. package/src/store/fix-msg-store.ts +8 -13
  961. package/src/transport/ascii/ascii-msg-transmitter.ts +23 -13
  962. package/src/transport/ascii/ascii-session-msg-factory.ts +62 -0
  963. package/src/transport/ascii/ascii-session.ts +102 -34
  964. package/src/transport/ascii/index.ts +1 -1
  965. package/src/transport/duplex/http-duplex.ts +3 -3
  966. package/src/transport/duplex/tcp-duplex.ts +4 -1
  967. package/src/transport/factory/index.ts +1 -0
  968. package/src/transport/factory/msg-transport.ts +55 -0
  969. package/src/transport/fix-acceptor.ts +2 -2
  970. package/src/transport/fix-entity.ts +9 -0
  971. package/src/transport/fix-initiator.ts +2 -2
  972. package/src/transport/fixml/fixml-msg-transmitter.ts +8 -4
  973. package/src/transport/fixml/fixml-session-msg-factory.ts +76 -0
  974. package/src/transport/fixml/fixml-session.ts +2 -2
  975. package/src/transport/fixml/index.ts +1 -2
  976. package/src/transport/http/html-options.ts +8 -0
  977. package/src/transport/http/html-route.ts +6 -0
  978. package/src/transport/http/http-acceptor-listener.ts +42 -0
  979. package/src/transport/http/http-acceptor.ts +12 -8
  980. package/src/transport/http/http-adapter.ts +7 -0
  981. package/src/transport/http/http-initiator.ts +40 -25
  982. package/src/transport/http/http-json-sample-adapter.ts +7 -2
  983. package/src/transport/http/http-transaction.ts +1 -1
  984. package/src/transport/http/http-transport-description.ts +9 -0
  985. package/src/transport/http/index.ts +1 -0
  986. package/src/transport/index.ts +11 -10
  987. package/src/transport/msg-application.ts +13 -0
  988. package/src/transport/msg-transmitter.ts +5 -5
  989. package/src/transport/session/a-session-msg-factory.ts +81 -0
  990. package/src/transport/session/fix-session-state-args.ts +9 -0
  991. package/src/transport/{fix-session-state.ts → session/fix-session-state.ts} +23 -43
  992. package/src/transport/{fix-session.ts → session/fix-session.ts} +111 -46
  993. package/src/transport/{make-fixl-session.ts → session/make-fix-session.ts} +1 -1
  994. package/src/transport/session/session-description.ts +18 -0
  995. package/src/transport/{fix-msg-factory.ts → session/session-msg-factory.ts} +2 -2
  996. package/src/transport/session/session-state.ts +25 -0
  997. package/src/transport/tcp/index.ts +3 -2
  998. package/src/transport/tcp/recovering-tcp-initiator.ts +24 -13
  999. package/src/transport/tcp/tcp-acceptor-listener.ts +45 -0
  1000. package/src/transport/tcp/tcp-acceptor.ts +65 -40
  1001. package/src/transport/tcp/tcp-initiator-connector.ts +71 -0
  1002. package/src/transport/tcp/tcp-initiator.ts +71 -42
  1003. package/src/transport/tcp/tcp-transport-description.ts +7 -0
  1004. package/src/transport/tcp/tls-options-factory.ts +55 -0
  1005. package/src/transport/tcp/tls-options.ts +9 -51
  1006. package/src/transport/tick-action.ts +8 -0
  1007. package/src/types/FIX4.4/repo/enum/all-enum.ts +0 -1
  1008. package/src/util/definition-factory.ts +47 -0
  1009. package/src/util/dictionary-path.ts +4 -0
  1010. package/src/util/index.ts +1 -1
  1011. package/src/util/json-helper.ts +14 -4
  1012. package/src/util/message-generator.ts +6 -3
  1013. package/src/util/replay.ts +26 -21
  1014. package/tsconfig.json +2 -0
  1015. package/dist/buffer/ascii-chars.js.map +0 -1
  1016. package/dist/dictionary/fields-dispatch.js +0 -40
  1017. package/dist/dictionary/fields-dispatch.js.map +0 -1
  1018. package/dist/header.d.ts +0 -31
  1019. package/dist/header.js.map +0 -1
  1020. package/dist/hop.d.ts +0 -4
  1021. package/dist/hop.js.map +0 -1
  1022. package/dist/hop_no_hops.d.ts +0 -5
  1023. package/dist/hop_no_hops.js.map +0 -1
  1024. package/dist/sample/http/oms/jsfix.test_http-client.txt +0 -170
  1025. package/dist/sample/http/oms/jsfix.test_http-server.txt +0 -170
  1026. package/dist/sample/tcp/qf-md/jsfix.test_client.txt +0 -18
  1027. package/dist/sample/tcp/qf-md/jsfix.test_server.txt +0 -17
  1028. package/dist/sample/tcp/recovering-skeleton/jsfix.test_client.txt +0 -96
  1029. package/dist/sample/tcp/recovering-skeleton/jsfix.test_server.txt +0 -93
  1030. package/dist/sample/tcp/recovering-skeleton/skeleton-session.d.ts +0 -17
  1031. package/dist/sample/tcp/recovering-skeleton/skeleton-session.js +0 -70
  1032. package/dist/sample/tcp/recovering-skeleton/skeleton-session.js.map +0 -1
  1033. package/dist/sample/tcp/skeleton/jsfix.test_client.txt +0 -6
  1034. package/dist/sample/tcp/skeleton/jsfix.test_server.txt +0 -6
  1035. package/dist/sample/tcp/tls-trade-capture/jsfix.test_client.txt +0 -1871
  1036. package/dist/sample/tcp/tls-trade-capture/jsfix.test_server.txt +0 -3059
  1037. package/dist/sample/tcp/trade_capture/app.d.ts +0 -1
  1038. package/dist/sample/tcp/trade_capture/app.js +0 -24
  1039. package/dist/sample/tcp/trade_capture/app.js.map +0 -1
  1040. package/dist/sample/tcp/trade_capture/index.d.ts +0 -2
  1041. package/dist/sample/tcp/trade_capture/index.js.map +0 -1
  1042. package/dist/sample/tcp/trade_capture/jsfix.test_client.txt +0 -193
  1043. package/dist/sample/tcp/trade_capture/jsfix.test_server.txt +0 -193
  1044. package/dist/sample/tcp/trade_capture/trade-capture-client.d.ts +0 -16
  1045. package/dist/sample/tcp/trade_capture/trade-capture-client.js +0 -57
  1046. package/dist/sample/tcp/trade_capture/trade-capture-client.js.map +0 -1
  1047. package/dist/sample/tcp/trade_capture/trade-capture-server.d.ts +0 -18
  1048. package/dist/sample/tcp/trade_capture/trade-capture-server.js +0 -72
  1049. package/dist/sample/tcp/trade_capture/trade-capture-server.js.map +0 -1
  1050. package/dist/sample/tcp/trade_capture/trade-factory.d.ts +0 -11
  1051. package/dist/sample/tcp/trade_capture/trade-factory.js +0 -81
  1052. package/dist/sample/tcp/trade_capture/trade-factory.js.map +0 -1
  1053. package/dist/standard_header.d.ts +0 -31
  1054. package/dist/standard_header.js.map +0 -1
  1055. package/dist/standard_trailer.d.ts +0 -6
  1056. package/dist/standard_trailer.js +0 -3
  1057. package/dist/standard_trailer.js.map +0 -1
  1058. package/dist/store/fix-msg-ascii-store-recovery.d.ts +0 -12
  1059. package/dist/store/fix-msg-ascii-store-recovery.js +0 -60
  1060. package/dist/store/fix-msg-ascii-store-recovery.js.map +0 -1
  1061. package/dist/store/fix-resend-record.d.ts +0 -12
  1062. package/dist/store/fix-resend-record.js +0 -12
  1063. package/dist/store/fix-resend-record.js.map +0 -1
  1064. package/dist/test/ascii-encode.test.d.ts +0 -1
  1065. package/dist/test/ascii-encode.test.js.map +0 -1
  1066. package/dist/test/ascii-store-recovery.test.d.ts +0 -1
  1067. package/dist/test/ascii-store-recovery.test.js +0 -50
  1068. package/dist/test/ascii-store-recovery.test.js.map +0 -1
  1069. package/dist/test/memory-store-test.d.ts +0 -1
  1070. package/dist/test/memory-store-test.js.map +0 -1
  1071. package/dist/trailer.d.ts +0 -6
  1072. package/dist/trailer.js.map +0 -1
  1073. package/dist/transport/fixml/acceptor.d.ts +0 -3
  1074. package/dist/transport/fixml/acceptor.js +0 -38
  1075. package/dist/transport/fixml/acceptor.js.map +0 -1
  1076. package/dist/transport/make-config.d.ts +0 -4
  1077. package/dist/transport/make-config.js +0 -31
  1078. package/dist/transport/make-config.js.map +0 -1
  1079. package/dist/transport/make-fixl-session.js +0 -3
  1080. package/dist/transport/make-fixl-session.js.map +0 -1
  1081. package/dist/transport/msg-store.d.ts +0 -2
  1082. package/dist/transport/msg-store.js +0 -3
  1083. package/dist/transport/msg-store.js.map +0 -1
  1084. package/dist/transport/msg-transport.js +0 -57
  1085. package/dist/transport/msg-transport.js.map +0 -1
  1086. package/dist/transport/tcp/acceptor.d.ts +0 -3
  1087. package/dist/transport/tcp/acceptor.js +0 -40
  1088. package/dist/transport/tcp/acceptor.js.map +0 -1
  1089. package/dist/transport/tcp/initiator.d.ts +0 -3
  1090. package/dist/transport/tcp/initiator.js +0 -67
  1091. package/dist/transport/tcp/initiator.js.map +0 -1
  1092. package/dist/transport/tcp/recovering-initiator.d.ts +0 -17
  1093. package/dist/transport/tcp/recovering-initiator.js +0 -30
  1094. package/dist/transport/tcp/recovering-initiator.js.map +0 -1
  1095. package/dist/transport/tcp/recovering_initiator.d.ts +0 -12
  1096. package/dist/transport/tcp/recovering_initiator.js +0 -25
  1097. package/dist/transport/tcp/recovering_initiator.js.map +0 -1
  1098. package/dist/types/FIX4.4/quickfix/set/header.d.ts +0 -31
  1099. package/dist/types/FIX4.4/quickfix/set/header.js +0 -3
  1100. package/dist/types/FIX4.4/quickfix/set/header.js.map +0 -1
  1101. package/dist/types/FIX4.4/quickfix/set/trailer.d.ts +0 -6
  1102. package/dist/types/FIX4.4/quickfix/set/trailer.js +0 -3
  1103. package/dist/types/FIX4.4/quickfix/set/trailer.js.map +0 -1
  1104. package/dist/util/dictionary-definitions.d.ts +0 -8
  1105. package/dist/util/dictionary-definitions.js +0 -51
  1106. package/dist/util/dictionary-definitions.js.map +0 -1
  1107. package/src/dictionary/fields-dispatch.ts +0 -45
  1108. package/src/sample/launcher.ts +0 -46
  1109. package/src/transport/fixml/acceptor.ts +0 -29
  1110. package/src/transport/make-config.ts +0 -19
  1111. package/src/transport/msg-transport.ts +0 -67
  1112. package/src/transport/session-description.ts +0 -70
  1113. package/src/transport/session-msg-factory.ts +0 -195
  1114. package/src/transport/tcp/acceptor.ts +0 -31
  1115. package/src/transport/tcp/initiator.ts +0 -59
  1116. package/src/util/dictionary-definitions.ts +0 -41
@@ -1 +1 @@
1
- {"version":3,"file":"msg-view.js","sourceRoot":"","sources":["../../src/buffer/msg-view.ts"],"names":[],"mappings":";;;AAAA,uCAAkC;AAKlC,8CAAgO;AAEhO,qDAAgD;AAEhD,MAAsB,OAAO;IAI3B,YAAuC,OAA2B,EAAkB,SAAoB;QAAjE,YAAO,GAAP,OAAO,CAAoB;QAAkB,cAAS,GAAT,SAAS,CAAW;IACxG,CAAC;IAES,MAAM,CAAC,SAAS,CAAE,KAA4B,EAAE,GAAW,EAAE,CAAS,EAAE,KAAa,EAAE,EAAU;QACzG,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAA;QACjC,IAAI,IAAY,CAAA;QAChB,IAAI,IAAY,CAAA;QAChB,IAAI,KAAK,EAAE;YACT,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,SAAS,CAAA;YAC9B,IAAI,KAAK,CAAC,MAAM,EAAE,EAAE;gBAClB,IAAI,GAAG,GAAG,GAAG,IAAI,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,OAAO,KAAK,KAAK,CAAC,WAAW,IAAI,EAAE,GAAG,OAAO,GAAG,OAAO,EAAE,CAAA;aACrG;iBAAM;gBACL,IAAI,GAAG,GAAG,GAAG,GAAG,OAAO,IAAI,KAAK,CAAC,WAAW,IAAI,EAAE,GAAG,OAAO,GAAG,OAAO,EAAE,CAAA;aACzE;SACF;aAAM;YACL,IAAI,GA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C,OAAO,CAAA;QAChD,MAAM,IAAI,GAAS,SAAS,CAAC,IAAI,CAAA;QACjC,MAAM,KAAK,GAAW,OAAO,CAAC,WAAW,GAAG,OAAO,CAAC,aAAa,CAAA;QACjE,MAAM,MAAM,GAAsC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAA;QAEzE,KAAK,IAAI,CAAC,GAAW,OAAO,CAAC,aAAa,EAAE,CAAC,IAAI,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,EAAE;YACzE,MAAM,MAAM,GAAW,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;YACrC,MAAM,KAAK,GAA0B,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAA;YACtE,MAAM,GAAG,GAAW,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAA;YAC5C,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,aAAa,EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;YAC5E,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAA;SAC1B;QAED,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAA;IAC1B,CAAC;CACF;AAvZD,0BAuZC","sourcesContent":["import { TagPos } from './tag-pos'\r\nimport { SegmentDescription } from './segment-description'\r\nimport { Structure } from './structure'\r\nimport { Dictionary } from '../collections'\r\nimport { Tags } from './tags'\r\nimport { ContainedGroupField, ContainedComponentField, ContainedField, ContainedFieldSet, ContainedSimpleField, SimpleFieldDefinition, GroupFieldDefinition, ITypeDispatcher, reduceSet, ContainedSetType } from '../dictionary'\r\nimport { ILooseObject } from '../collections/collection'\r\nimport { ElasticBuffer } from './elastic-buffer'\r\n\r\nexport abstract class MsgView {\r\n protected sortedTagPosForwards: TagPos[]\r\n protected sortedTagPosBackwards: TagPos[]\r\n\r\n protected constructor (public readonly segment: SegmentDescription, public readonly structure: Structure) {\r\n }\r\n\r\n protected static asVerbose (field: SimpleFieldDefinition, val: string, i: number, count: number, tp: TagPos): string {\r\n const newLine = require('os').EOL\r\n let desc: string\r\n let name: string\r\n if (field) {\r\n name = field.name || 'unknown'\r\n if (field.isEnum()) {\r\n desc = `${val}[${field.resolveEnum(val)}]${newLine}\\t${field.description || ''}${newLine}${newLine}`\r\n } else {\r\n desc = `${val}${newLine}t${field.description || ''}${newLine}${newLine}`\r\n }\r\n } else {\r\n name = 'unknown'\r\n }\r\n return `[${i}] ${tp.tag} (${name}) = ${desc}`\r\n }\r\n\r\n protected static asToken (field: SimpleFieldDefinition, val: string, i: number, count: number, tp: TagPos): string {\r\n const perLine: number = 2\r\n const newLine = require('os').EOL\r\n // [280] 814 (ApplQueueResolution) = 2[OverlayLast][281] 10 (CheckSum) = 80\r\n let desc: string\r\n let name: string\r\n if (field) {\r\n name = field.name || 'unknown'\r\n if (field.isEnum()) {\r\n desc = `${val}[${field.resolveEnum(val)}]`\r\n } else {\r\n desc = `${val}`\r\n }\r\n } else {\r\n desc = `${val}`\r\n name = 'unknown'\r\n }\r\n let delimiter: string\r\n if (i === 1 || (i < count && i % perLine - 1 === 0)) {\r\n delimiter = newLine\r\n } else {\r\n delimiter = i < count ? ', ' : ''\r\n }\r\n return `[${i}] ${tp.tag} (${name}) = ${desc}${delimiter}`\r\n }\r\n\r\n // return list of any tags parsed that are not valid\r\n public invalid (): number[] {\r\n const invalidTags: number[] = []\r\n const set = this.segment.set\r\n const tags = this.structure.tags\r\n for (let i = 0; i < tags.nextTagPos; ++i) {\r\n const tag = tags.tagPos[i].tag\r\n if (tag <= 0 || !set.containedTag[tag]) {\r\n invalidTags[invalidTags.length] = tag\r\n }\r\n }\r\n return invalidTags\r\n }\r\n\r\n // list of tags that must be present\r\n public missing (): number[] {\r\n return this.missingRequired(this.segment.set, [])\r\n }\r\n\r\n public contains (tagOrName: number | string): boolean {\r\n const tag: number = this.resolveTag(tagOrName)\r\n const position: number = this.getPosition(tag)\r\n return position >= 0\r\n }\r\n\r\n public getGroupInstance (i: number): MsgView {\r\n const instance: SegmentDescription = this.segment.getInstance(i)\r\n if (!instance) {\r\n return null\r\n }\r\n return this.create(instance)\r\n }\r\n\r\n public getUndefined (): SegmentDescription | SegmentDescription[] {\r\n return this.structure.layout['.undefined']\r\n }\r\n\r\n public undefinedForMsg (): string {\r\n let msg: string = null\r\n const undefinedTags = this.getUndefined()\r\n if (undefinedTags) {\r\n if (Array.isArray(undefinedTags)) {\r\n msg = `undefined tags = ` + undefinedTags.map((e: SegmentDescription) => e.startTag.toString()).join(', ')\r\n } else {\r\n msg = `undefined tag = ${undefinedTags.startTag}`\r\n }\r\n }\r\n return msg\r\n }\r\n\r\n public groupCount (): number {\r\n const positions = this.segment.delimiterPositions\r\n return positions ? positions.length : 0\r\n }\r\n\r\n public getString (tagOrName: number | string): string {\r\n const tag: number = this.resolveTag(tagOrName)\r\n if (tag == null) {\r\n return null\r\n }\r\n const position: number = this.getPosition(tag)\r\n if (position < 0) {\r\n return null\r\n }\r\n return this.stringAtPosition(position)\r\n }\r\n\r\n public getStrings (tagOrName: number | string = -1): string[] {\r\n if (tagOrName < 0) {\r\n return this.allStrings()\r\n }\r\n const tag: number = this.resolveTag(tagOrName)\r\n if (tag == null) {\r\n return null\r\n }\r\n const positions: number[] = this.getPositions(tag)\r\n if (positions == null) {\r\n return null\r\n }\r\n return positions.map((position: number) => {\r\n return this.stringAtPosition(position)\r\n })\r\n }\r\n\r\n public getTyped (tagOrName: number | string): any {\r\n const tag: number = this.resolveTag(tagOrName)\r\n if (tag == null) {\r\n return null\r\n }\r\n const field: SimpleFieldDefinition = this.structure.tags.definitions.tagToSimple[tag]\r\n if (field == null) {\r\n return null\r\n }\r\n return this.toTyped(field)\r\n }\r\n\r\n public getTypedTags (tagOrName: any[]): any[] {\r\n return tagOrName.map((s) => this.getTyped(s))\r\n }\r\n\r\n public toObject (): any {\r\n const segment: SegmentDescription = this.segment\r\n if (segment.delimiterTag) {\r\n switch (segment.set.type) {\r\n case ContainedSetType.Group: {\r\n return this.asInstances((segment.set as GroupFieldDefinition).name)\r\n }\r\n case ContainedSetType.Msg: {\r\n // this is a batch of messages\r\n const hdrView = this.getView('Hdr')\r\n const batch: ILooseObject = {}\r\n if (hdrView) {\r\n batch[hdrView.segment.set.name] = hdrView.toObject()\r\n }\r\n batch[segment.name] = this.asInstances(segment.name)\r\n return batch\r\n }\r\n }\r\n }\r\n return this.asLoose(segment.set)\r\n }\r\n\r\n public toString (): string {\r\n return this.stringify(MsgView.asToken)\r\n }\r\n\r\n public toVerbose (): string {\r\n return this.stringify(MsgView.asVerbose)\r\n }\r\n\r\n public toJson (): string {\r\n return JSON.stringify(this.toObject(), null, 4)\r\n }\r\n\r\n public getView (name: string): MsgView {\r\n const parts: string[] = name.split('.')\r\n return parts.reduce((a: MsgView, current: string) => {\r\n if (!a) {\r\n return a\r\n }\r\n const structure = a.structure\r\n const singleton: SegmentDescription = structure.firstContainedWithin(current, a.segment)\r\n if (singleton) {\r\n return a.create(singleton)\r\n }\r\n // is this a full name where abbreviation exists\r\n const component: ContainedField = a.segment.set.localNameToField.get(current)\r\n if (component) {\r\n const abbreviated: SegmentDescription = structure.firstContainedWithin(component.name, a.segment)\r\n if (abbreviated) {\r\n return a.create(abbreviated)\r\n }\r\n }\r\n return null\r\n }, this as MsgView)\r\n }\r\n\r\n public abstract checksum (): number\r\n\r\n public abstract clone (): MsgView\r\n\r\n protected abstract create (singleton: SegmentDescription): MsgView\r\n\r\n protected abstract stringAtPosition (position: number): string\r\n\r\n protected abstract toTyped (field: SimpleFieldDefinition): any\r\n\r\n protected resolveTag (tagOrName: number | string): number {\r\n let tag: number\r\n if (typeof(tagOrName) === 'string') {\r\n let cf = this.segment.set.simple.get(tagOrName)\r\n const f: SimpleFieldDefinition = cf ? cf.definition : this.structure.tags.definitions.simple.get(tagOrName)\r\n if (f == null) {\r\n return null\r\n }\r\n tag = f.tag\r\n } else {\r\n tag = tagOrName\r\n }\r\n return tag\r\n }\r\n\r\n // fetch all positions of a particular tag.\r\n protected getPositions (tag: number): number[] {\r\n const forwards: TagPos[] = this.sortedTagPosForwards\r\n const backwards: TagPos[] = this.sortedTagPosBackwards\r\n const position: number = this.binarySearch(tag)\r\n if (position < 0) {\r\n return null\r\n }\r\n\r\n const count: number = forwards.length\r\n const last: number = count - 1\r\n let end: number = position\r\n while (end <= last) {\r\n if (tag !== forwards[end].tag) {\r\n break\r\n }\r\n ++end\r\n }\r\n // avoid backtracking over an array by scan forwards on a reversed copy\r\n let start: number = last - position\r\n while (start <= last) {\r\n if (tag !== backwards[start].tag) {\r\n break\r\n }\r\n ++start\r\n }\r\n const begin: number = last - (start - 1)\r\n const len: number = end - begin\r\n const positions: number[] = new Array(len)\r\n for (let i: number = begin; i < end; ++i) {\r\n positions[i - begin] = forwards[i].position\r\n }\r\n return positions\r\n }\r\n\r\n protected getPosition (tag: number): number {\r\n const pos: number = this.binarySearch(tag)\r\n if (pos >= 0) {\r\n return this.sortedTagPosForwards[pos].position\r\n } else {\r\n return -1\r\n }\r\n }\r\n\r\n private allStrings (): string[] {\r\n const segment: SegmentDescription = this.segment\r\n const range: number[] = []\r\n for (let i: number = segment.startPosition; i <= segment.endPosition; ++i) {\r\n range[range.length] = i\r\n }\r\n return range.map((i: number) => this.stringAtPosition(i))\r\n }\r\n\r\n private asInstances (name: string): ILooseObject[] {\r\n const groupView: MsgView = this.getView(name)\r\n if (groupView == null) {\r\n return\r\n }\r\n const groupArray: ILooseObject[] = new Array(groupView.groupCount())\r\n const count: number = groupView.groupCount()\r\n for (let j: number = 0; j < count; ++j) {\r\n const instance: MsgView = groupView.getGroupInstance(j)\r\n groupArray[j] = instance.toObject()\r\n }\r\n return groupArray\r\n }\r\n\r\n private asLoose (def: ContainedFieldSet): ILooseObject {\r\n return reduceSet<ILooseObject>(def, {\r\n group: (a: ILooseObject, field: ContainedGroupField) => this.asLooseGroup(a, field),\r\n simple: (a: ILooseObject, field: ContainedSimpleField) => this.asLooseSimple(a, field),\r\n component: (a: ILooseObject, field: ContainedComponentField) => this.asLooseComponent(a, field)\r\n } as ITypeDispatcher<ILooseObject>, def.localAttribute.reduce((a: ILooseObject, sf: ContainedSimpleField) => {\r\n const def = sf.definition\r\n const position: number = this.getPosition(def.tag)\r\n if (position >= 0) {\r\n a[def.name] = this.toTyped(def)\r\n }\r\n return a\r\n }, {} as ILooseObject))\r\n }\r\n\r\n private missingRequired (def: ContainedFieldSet, tags: number []): number[] {\r\n return reduceSet<number[]>(def, {\r\n group: (a: number[], field: ContainedGroupField) => this.missingGroup(def, field, a),\r\n simple: (a: number[], field: ContainedSimpleField) => this.missingSimple(field, a),\r\n component: (a: number[], field: ContainedComponentField) => this.missingComponent(field, a)\r\n } as ITypeDispatcher<number[]>, tags)\r\n }\r\n\r\n private missingSimple (sf: ContainedSimpleField, a: number[]) {\r\n if (sf.required && this.getPosition(sf.definition.tag) < 0) {\r\n a.push(sf.definition.tag)\r\n }\r\n }\r\n\r\n private missingComponent (cf: ContainedComponentField, a: number[]) {\r\n const view: MsgView = this.getView(cf.name)\r\n if (view) {\r\n view.missingRequired(cf.definition, a)\r\n }\r\n }\r\n\r\n private missingGroup (def: ContainedFieldSet, gf: ContainedGroupField, tags: number []) {\r\n const name = gf.definition.noOfField ? gf.definition.noOfField.name : def.name\r\n const groupView: MsgView = this.getView(name) || this.getView(gf.definition.name)\r\n if (groupView == null) {\r\n return\r\n }\r\n const count: number = groupView.groupCount()\r\n for (let j: number = 0; j < count; ++j) {\r\n const instance: MsgView = groupView.getGroupInstance(j)\r\n instance.missingRequired(gf.definition, tags)\r\n }\r\n }\r\n\r\n private asLooseComponent (a: ILooseObject, cf: ContainedComponentField) {\r\n const view: MsgView = this.getView(cf.name)\r\n if (view) {\r\n const component = view.toObject()\r\n if (component) {\r\n a[cf.definition.name] = component\r\n }\r\n }\r\n }\r\n\r\n private asLooseSimple (a: ILooseObject, sf: ContainedSimpleField) {\r\n const def = sf.definition\r\n const position: number = this.getPosition(def.tag)\r\n if (position >= 0) {\r\n const asSimple: any = this.toTyped(def)\r\n if (asSimple != null) { // beware, may be false value\r\n a[sf.name] = asSimple\r\n }\r\n }\r\n }\r\n\r\n private asLooseGroup (a: ILooseObject, gf: ContainedGroupField) {\r\n const def = gf.definition\r\n const name = def.noOfField ? def.noOfField.name : def.name\r\n const instances: ILooseObject = this.asInstances(name) || this.asInstances(def.name)\r\n if (instances) {\r\n a[def.name] = instances\r\n }\r\n }\r\n\r\n private binarySearch (tag: number): number {\r\n let forwards = this.sortedTagPosForwards\r\n if (!forwards) {\r\n const segment = this.segment\r\n forwards = this.sortedTagPosForwards = this.structure.tags.tagPos.slice(segment.startPosition, segment.endPosition + 1)\r\n forwards.sort(TagPos.compare)\r\n this.sortedTagPosBackwards = forwards.slice().reverse()\r\n }\r\n return TagPos.binarySearch(forwards, tag)\r\n }\r\n\r\n private stringify (getToken: (field: SimpleFieldDefinition, val: string, i: number, count: number, tp: TagPos) => string): string {\r\n const structure = this.structure\r\n const buffer: ElasticBuffer = new ElasticBuffer()\r\n const segment: SegmentDescription = this.segment\r\n const tags: Tags = structure.tags\r\n const count: number = segment.endPosition - segment.startPosition\r\n const simple: Dictionary<SimpleFieldDefinition> = tags.definitions.simple\r\n\r\n for (let i: number = segment.startPosition; i <= segment.endPosition; ++i) {\r\n const tagPos: TagPos = tags.tagPos[i]\r\n const field: SimpleFieldDefinition = simple.get(tagPos.tag.toString())\r\n const val: string = this.stringAtPosition(i)\r\n const token = getToken(field, val, i - segment.startPosition, count, tagPos)\r\n buffer.writeString(token)\r\n }\r\n\r\n return buffer.toString()\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"msg-view.js","sourceRoot":"","sources":["../../src/buffer/msg-view.ts"],"names":[],"mappings":";;;AAAA,2CAAsC;AAOtC,8CAAyC;AAEzC,qDAAgD;AAGhD,yEAAmE;AAEnE,MAAsB,OAAO;IAI3B,YAAuC,OAA2B,EAAkB,SAAoB;QAAjE,YAAO,GAAP,O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MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAA;YACtE,MAAM,GAAG,GAAW,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAA;YAC5C,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,aAAa,EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;YAC5E,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAA;SAC1B;QAED,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAA;IAC1B,CAAC;CACF;AAzZD,0BAyZC","sourcesContent":["import { TagPos } from './tag/tag-pos'\r\nimport { SegmentDescription } from './segment/segment-description'\r\nimport { Structure } from './structure'\r\nimport { Dictionary } from '../collections'\r\nimport { Tags } from './tag/tags'\r\nimport { ContainedGroupField, ContainedComponentField, ContainedField,\r\n ContainedFieldSet, ContainedSimpleField } from '../dictionary/contained'\r\nimport { SetReduce } from '../dictionary'\r\nimport { ILooseObject } from '../collections/collection'\r\nimport { ElasticBuffer } from './elastic-buffer'\r\nimport { GroupFieldDefinition, SimpleFieldDefinition } from '../dictionary/definition'\r\nimport { ITypeDispatcher } from '../dictionary/type-dispatcher'\r\nimport { ContainedSetType } from '../dictionary/contained-set-type'\r\n\r\nexport abstract class MsgView {\r\n protected sortedTagPosForwards: TagPos[]\r\n protected sortedTagPosBackwards: TagPos[]\r\n\r\n protected constructor (public readonly segment: SegmentDescription, public readonly structure: Structure) {\r\n }\r\n\r\n protected static asVerbose (field: SimpleFieldDefinition, val: string, i: number, count: number, tp: TagPos): string {\r\n const newLine = require('os').EOL\r\n let desc: string\r\n let name: string\r\n if (field) {\r\n name = field.name || 'unknown'\r\n if (field.isEnum()) {\r\n desc = `${val}[${field.resolveEnum(val)}]${newLine}\\t${field.description || ''}${newLine}${newLine}`\r\n } else {\r\n desc = `${val}${newLine}t${field.description || ''}${newLine}${newLine}`\r\n }\r\n } else {\r\n name = 'unknown'\r\n }\r\n return `[${i}] ${tp.tag} (${name}) = ${desc}`\r\n }\r\n\r\n protected static asToken (field: SimpleFieldDefinition, val: string, i: number, count: number, tp: TagPos): string {\r\n const perLine: number = 2\r\n const newLine = require('os').EOL\r\n // [280] 814 (ApplQueueResolution) = 2[OverlayLast][281] 10 (CheckSum) = 80\r\n let desc: string\r\n let name: string\r\n if (field) {\r\n name = field.name || 'unknown'\r\n if (field.isEnum()) {\r\n desc = `${val}[${field.resolveEnum(val)}]`\r\n } else {\r\n desc = `${val}`\r\n }\r\n } else {\r\n desc = `${val}`\r\n name = 'unknown'\r\n }\r\n let delimiter: string\r\n if (i === 1 || (i < count && i % perLine - 1 === 0)) {\r\n delimiter = newLine\r\n } else {\r\n delimiter = i < count ? ', ' : ''\r\n }\r\n return `[${i}] ${tp.tag} (${name}) = ${desc}${delimiter}`\r\n }\r\n\r\n // return list of any tags parsed that are not valid\r\n public invalid (): number[] {\r\n const invalidTags: number[] = []\r\n const set = this.segment.set\r\n const tags = this.structure.tags\r\n for (let i = 0; i < tags.nextTagPos; ++i) {\r\n const tag = tags.tagPos[i].tag\r\n if (tag <= 0 || !set.containedTag[tag]) {\r\n invalidTags[invalidTags.length] = tag\r\n }\r\n }\r\n return invalidTags\r\n }\r\n\r\n // list of tags that must be present\r\n public missing (): number[] {\r\n return this.missingRequired(this.segment.set, [])\r\n }\r\n\r\n public contains (tagOrName: number | string): boolean {\r\n const tag: number = this.resolveTag(tagOrName)\r\n const position: number = this.getPosition(tag)\r\n return position >= 0\r\n }\r\n\r\n public getGroupInstance (i: number): MsgView {\r\n const instance: SegmentDescription = this.segment.getInstance(i)\r\n if (!instance) {\r\n return null\r\n }\r\n return this.create(instance)\r\n }\r\n\r\n public getUndefined (): SegmentDescription | SegmentDescription[] {\r\n return this.structure.layout['.undefined']\r\n }\r\n\r\n public undefinedForMsg (): string {\r\n let msg: string = null\r\n const undefinedTags = this.getUndefined()\r\n if (undefinedTags) {\r\n if (Array.isArray(undefinedTags)) {\r\n msg = `undefined tags = ` + undefinedTags.map((e: SegmentDescription) => e.startTag.toString()).join(', ')\r\n } else {\r\n msg = `undefined tag = ${undefinedTags.startTag}`\r\n }\r\n }\r\n return msg\r\n }\r\n\r\n public groupCount (): number {\r\n const positions = this.segment.delimiterPositions\r\n return positions ? positions.length : 0\r\n }\r\n\r\n public getString (tagOrName: number | string): string {\r\n const tag: number = this.resolveTag(tagOrName)\r\n if (tag == null) {\r\n return null\r\n }\r\n const position: number = this.getPosition(tag)\r\n if (position < 0) {\r\n return null\r\n }\r\n return this.stringAtPosition(position)\r\n }\r\n\r\n public getStrings (tagOrName: number | string = -1): string[] {\r\n if (tagOrName < 0) {\r\n return this.allStrings()\r\n }\r\n const tag: number = this.resolveTag(tagOrName)\r\n if (tag == null) {\r\n return null\r\n }\r\n const positions: number[] = this.getPositions(tag)\r\n if (positions == null) {\r\n return null\r\n }\r\n return positions.map((position: number) => {\r\n return this.stringAtPosition(position)\r\n })\r\n }\r\n\r\n public getTyped (tagOrName: number | string): any {\r\n const tag: number = this.resolveTag(tagOrName)\r\n if (tag == null) {\r\n return null\r\n }\r\n const field: SimpleFieldDefinition = this.structure.tags.definitions.tagToSimple[tag]\r\n if (field == null) {\r\n return null\r\n }\r\n return this.toTyped(field)\r\n }\r\n\r\n public getTypedTags (tagOrName: any[]): any[] {\r\n return tagOrName.map((s) => this.getTyped(s))\r\n }\r\n\r\n public toObject (): any {\r\n const segment: SegmentDescription = this.segment\r\n if (segment.delimiterTag) {\r\n switch (segment.set.type) {\r\n case ContainedSetType.Group: {\r\n return this.asInstances((segment.set as GroupFieldDefinition).name)\r\n }\r\n case ContainedSetType.Msg: {\r\n // this is a batch of messages\r\n const hdrView = this.getView('Hdr')\r\n const batch: ILooseObject = {}\r\n if (hdrView) {\r\n batch[hdrView.segment.set.name] = hdrView.toObject()\r\n }\r\n batch[segment.name] = this.asInstances(segment.name)\r\n return batch\r\n }\r\n }\r\n }\r\n return this.asLoose(segment.set)\r\n }\r\n\r\n public toString (): string {\r\n return this.stringify(MsgView.asToken)\r\n }\r\n\r\n public toVerbose (): string {\r\n return this.stringify(MsgView.asVerbose)\r\n }\r\n\r\n public toJson (): string {\r\n return JSON.stringify(this.toObject(), null, 4)\r\n }\r\n\r\n public getView (name: string): MsgView {\r\n const parts: string[] = name.split('.')\r\n return parts.reduce((a: MsgView, current: string) => {\r\n if (!a) {\r\n return a\r\n }\r\n const structure = a.structure\r\n const singleton: SegmentDescription = structure.firstContainedWithin(current, a.segment)\r\n if (singleton) {\r\n return a.create(singleton)\r\n }\r\n // is this a full name where abbreviation exists\r\n const component: ContainedField = a.segment.set.localNameToField.get(current)\r\n if (component) {\r\n const abbreviated: SegmentDescription = structure.firstContainedWithin(component.name, a.segment)\r\n if (abbreviated) {\r\n return a.create(abbreviated)\r\n }\r\n }\r\n return null\r\n }, this as MsgView)\r\n }\r\n\r\n public abstract checksum (): number\r\n\r\n public abstract clone (): MsgView\r\n\r\n protected abstract create (singleton: SegmentDescription): MsgView\r\n\r\n protected abstract stringAtPosition (position: number): string\r\n\r\n protected abstract toTyped (field: SimpleFieldDefinition): any\r\n\r\n protected resolveTag (tagOrName: number | string): number {\r\n let tag: number\r\n if (typeof(tagOrName) === 'string') {\r\n let cf = this.segment.set.simple.get(tagOrName)\r\n const f: SimpleFieldDefinition = cf ? cf.definition : this.structure.tags.definitions.simple.get(tagOrName)\r\n if (f == null) {\r\n return null\r\n }\r\n tag = f.tag\r\n } else {\r\n tag = tagOrName\r\n }\r\n return tag\r\n }\r\n\r\n // fetch all positions of a particular tag.\r\n protected getPositions (tag: number): number[] {\r\n const forwards: TagPos[] = this.sortedTagPosForwards\r\n const backwards: TagPos[] = this.sortedTagPosBackwards\r\n const position: number = this.binarySearch(tag)\r\n if (position < 0) {\r\n return null\r\n }\r\n\r\n const count: number = forwards.length\r\n const last: number = count - 1\r\n let end: number = position\r\n while (end <= last) {\r\n if (tag !== forwards[end].tag) {\r\n break\r\n }\r\n ++end\r\n }\r\n // avoid backtracking over an array by scan forwards on a reversed copy\r\n let start: number = last - position\r\n while (start <= last) {\r\n if (tag !== backwards[start].tag) {\r\n break\r\n }\r\n ++start\r\n }\r\n const begin: number = last - (start - 1)\r\n const len: number = end - begin\r\n const positions: number[] = new Array(len)\r\n for (let i: number = begin; i < end; ++i) {\r\n positions[i - begin] = forwards[i].position\r\n }\r\n return positions\r\n }\r\n\r\n protected getPosition (tag: number): number {\r\n const pos: number = this.binarySearch(tag)\r\n if (pos >= 0) {\r\n return this.sortedTagPosForwards[pos].position\r\n } else {\r\n return -1\r\n }\r\n }\r\n\r\n private allStrings (): string[] {\r\n const segment: SegmentDescription = this.segment\r\n const range: number[] = []\r\n for (let i: number = segment.startPosition; i <= segment.endPosition; ++i) {\r\n range[range.length] = i\r\n }\r\n return range.map((i: number) => this.stringAtPosition(i))\r\n }\r\n\r\n private asInstances (name: string): ILooseObject[] {\r\n const groupView: MsgView = this.getView(name)\r\n if (groupView == null) {\r\n return\r\n }\r\n const groupArray: ILooseObject[] = new Array(groupView.groupCount())\r\n const count: number = groupView.groupCount()\r\n for (let j: number = 0; j < count; ++j) {\r\n const instance: MsgView = groupView.getGroupInstance(j)\r\n groupArray[j] = instance.toObject()\r\n }\r\n return groupArray\r\n }\r\n\r\n private asLoose (def: ContainedFieldSet): ILooseObject {\r\n const reducer = new SetReduce<ILooseObject>()\r\n return reducer.reduce(def, {\r\n group: (a: ILooseObject, field: ContainedGroupField) => this.asLooseGroup(a, field),\r\n simple: (a: ILooseObject, field: ContainedSimpleField) => this.asLooseSimple(a, field),\r\n component: (a: ILooseObject, field: ContainedComponentField) => this.asLooseComponent(a, field)\r\n } as ITypeDispatcher<ILooseObject>, def.localAttribute.reduce((a: ILooseObject, sf: ContainedSimpleField) => {\r\n const def = sf.definition\r\n const position: number = this.getPosition(def.tag)\r\n if (position >= 0) {\r\n a[def.name] = this.toTyped(def)\r\n }\r\n return a\r\n }, {} as ILooseObject))\r\n }\r\n\r\n private missingRequired (def: ContainedFieldSet, tags: number []): number[] {\r\n const reducer = new SetReduce<number[]>()\r\n return reducer.reduce(def, {\r\n group: (a: number[], field: ContainedGroupField) => this.missingGroup(def, field, a),\r\n simple: (a: number[], field: ContainedSimpleField) => this.missingSimple(field, a),\r\n component: (a: number[], field: ContainedComponentField) => this.missingComponent(field, a)\r\n } as ITypeDispatcher<number[]>, tags)\r\n }\r\n\r\n private missingSimple (sf: ContainedSimpleField, a: number[]) {\r\n if (sf.required && this.getPosition(sf.definition.tag) < 0) {\r\n a.push(sf.definition.tag)\r\n }\r\n }\r\n\r\n private missingComponent (cf: ContainedComponentField, a: number[]) {\r\n const view: MsgView = this.getView(cf.name)\r\n if (view) {\r\n view.missingRequired(cf.definition, a)\r\n }\r\n }\r\n\r\n private missingGroup (def: ContainedFieldSet, gf: ContainedGroupField, tags: number []) {\r\n const name = gf.definition.noOfField ? gf.definition.noOfField.name : def.name\r\n const groupView: MsgView = this.getView(name) || this.getView(gf.definition.name)\r\n if (groupView == null) {\r\n return\r\n }\r\n const count: number = groupView.groupCount()\r\n for (let j: number = 0; j < count; ++j) {\r\n const instance: MsgView = groupView.getGroupInstance(j)\r\n instance.missingRequired(gf.definition, tags)\r\n }\r\n }\r\n\r\n private asLooseComponent (a: ILooseObject, cf: ContainedComponentField) {\r\n const view: MsgView = this.getView(cf.name)\r\n if (view) {\r\n const component = view.toObject()\r\n if (component) {\r\n a[cf.definition.name] = component\r\n }\r\n }\r\n }\r\n\r\n private asLooseSimple (a: ILooseObject, sf: ContainedSimpleField) {\r\n const def = sf.definition\r\n const position: number = this.getPosition(def.tag)\r\n if (position >= 0) {\r\n const asSimple: any = this.toTyped(def)\r\n if (asSimple != null) { // beware, may be false value\r\n a[sf.name] = asSimple\r\n }\r\n }\r\n }\r\n\r\n private asLooseGroup (a: ILooseObject, gf: ContainedGroupField) {\r\n const def = gf.definition\r\n const name = def.noOfField ? def.noOfField.name : def.name\r\n const instances: ILooseObject = this.asInstances(name) || this.asInstances(def.name)\r\n if (instances) {\r\n a[def.name] = instances\r\n }\r\n }\r\n\r\n private binarySearch (tag: number): number {\r\n let forwards = this.sortedTagPosForwards\r\n if (!forwards) {\r\n const segment = this.segment\r\n forwards = this.sortedTagPosForwards = this.structure.tags.tagPos.slice(segment.startPosition, segment.endPosition + 1)\r\n forwards.sort(TagPos.compare)\r\n this.sortedTagPosBackwards = forwards.slice().reverse()\r\n }\r\n return TagPos.binarySearch(forwards, tag)\r\n }\r\n\r\n private stringify (getToken: (field: SimpleFieldDefinition, val: string, i: number, count: number, tp: TagPos) => string): string {\r\n const structure = this.structure\r\n const buffer: ElasticBuffer = new ElasticBuffer()\r\n const segment: SegmentDescription = this.segment\r\n const tags: Tags = structure.tags\r\n const count: number = segment.endPosition - segment.startPosition\r\n const simple: Dictionary<SimpleFieldDefinition> = tags.definitions.simple\r\n\r\n for (let i: number = segment.startPosition; i <= segment.endPosition; ++i) {\r\n const tagPos: TagPos = tags.tagPos[i]\r\n const field: SimpleFieldDefinition = simple.get(tagPos.tag.toString())\r\n const val: string = this.stringAtPosition(i)\r\n const token = getToken(field, val, i - segment.startPosition, count, tagPos)\r\n buffer.writeString(token)\r\n }\r\n\r\n return buffer.toString()\r\n }\r\n}\r\n"]}
@@ -0,0 +1,26 @@
1
+ import { INumericKeyed } from '../../collections/collection';
2
+ import { ContainedField, ContainedFieldSet } from '../../dictionary/contained';
3
+ import { SegmentType } from './segment-type';
4
+ export declare class SegmentDescription {
5
+ name: string;
6
+ startTag: number;
7
+ set: ContainedFieldSet;
8
+ startPosition: number;
9
+ readonly depth: number;
10
+ readonly type: SegmentType;
11
+ index: number;
12
+ endTag: number;
13
+ endPosition: number;
14
+ delimiterTag: number;
15
+ delimiterPositions: number[];
16
+ currentField: ContainedField;
17
+ containedDelimiterPositions: INumericKeyed<boolean>;
18
+ constructor(name: string, startTag: number, set: ContainedFieldSet, startPosition: number, depth: number, type: SegmentType);
19
+ contains(segment: SegmentDescription): boolean;
20
+ getInstance(instance: number): SegmentDescription;
21
+ startGroup(tag: number): void;
22
+ addDelimiterPosition(position: number): boolean;
23
+ setCurrentField(tag: number): void;
24
+ groupAddDelimiter(tag: number, position: number): boolean;
25
+ end(i: number, pos: number, endTag: number): void;
26
+ }
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SegmentDescription = void 0;
4
+ const definition_1 = require("../../dictionary/definition");
5
+ const segment_type_1 = require("./segment-type");
6
+ class SegmentDescription {
7
+ constructor(name, startTag, set, startPosition, depth, type) {
8
+ this.name = name;
9
+ this.startTag = startTag;
10
+ this.set = set;
11
+ this.startPosition = startPosition;
12
+ this.depth = depth;
13
+ this.type = type;
14
+ this.endTag = 0;
15
+ this.endPosition = 0;
16
+ this.delimiterTag = 0;
17
+ }
18
+ contains(segment) {
19
+ return segment.startPosition >= this.startPosition && segment.endPosition <= this.endPosition;
20
+ }
21
+ getInstance(instance) {
22
+ const delimiters = this.delimiterPositions;
23
+ if (!delimiters) {
24
+ return null;
25
+ }
26
+ if (instance < 0 || instance >= delimiters.length) {
27
+ return null;
28
+ }
29
+ const start = delimiters[instance];
30
+ const end = instance < delimiters.length - 1 ?
31
+ delimiters[instance + 1] - 1 :
32
+ this.endPosition;
33
+ const name = this.type === segment_type_1.SegmentType.Batch ? this.set.abbreviation : this.name;
34
+ const d = new SegmentDescription(name, this.startTag, this.set, start, this.depth, this.type);
35
+ d.endPosition = end;
36
+ d.endTag = this.endTag;
37
+ return d;
38
+ }
39
+ startGroup(tag) {
40
+ this.delimiterTag = tag;
41
+ this.delimiterPositions = [];
42
+ this.containedDelimiterPositions = {};
43
+ }
44
+ addDelimiterPosition(position) {
45
+ if (this.containedDelimiterPositions[position]) {
46
+ return false;
47
+ }
48
+ this.delimiterPositions[this.delimiterPositions.length] = position;
49
+ this.containedDelimiterPositions[position] = true;
50
+ return true;
51
+ }
52
+ setCurrentField(tag) {
53
+ this.currentField = this.set.localTag[tag] || this.set.tagToField[tag];
54
+ }
55
+ groupAddDelimiter(tag, position) {
56
+ let delimiter = false;
57
+ if (this.set instanceof definition_1.GroupFieldDefinition) {
58
+ if (this.delimiterTag && tag === this.delimiterTag) {
59
+ delimiter = this.addDelimiterPosition(position);
60
+ }
61
+ }
62
+ return delimiter;
63
+ }
64
+ end(i, pos, endTag) {
65
+ this.index = i;
66
+ this.currentField = null;
67
+ this.endPosition = pos;
68
+ this.endTag = endTag;
69
+ }
70
+ }
71
+ exports.SegmentDescription = SegmentDescription;
72
+ //# sourceMappingURL=segment-description.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"segment-description.js","sourceRoot":"","sources":["../../../src/buffer/segment/segment-description.ts"],"names":[],"mappings":";;;AAEA,4DAAkE;AAClE,iDAA4C;AAE5C,MAAa,kBAAkB;IAS7B,YACoB,IAAY,EACZ,QAAgB,EAChB,GAAsB,EACtB,aAAqB,EACZ,KAAa,EACb,IAAiB;QAL1B,SAAI,GAAJ,IAAI,CAAQ;QACZ,aAAQ,GAAR,QAAQ,CAAQ;QAChB,QAAG,GAAH,GAAG,CAAmB;QACtB,kBAAa,GAAb,aAAa,CAAQ;QACZ,UAAK,GAAL,KAAK,CAAQ;QACb,SAAI,GAAJ,IAAI,CAAa;QAbvC,WAAM,GAAW,CAAC,CAAA;QAClB,gBAAW,GAAW,CAAC,CAAA;QACvB,iBAAY,GAAW,CAAC,CAAA;IAY/B,CAAC;IAEM,QAAQ,CAAE,OAA2B;QAC1C,OAAO,OAAO,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,IAAI,OAAO,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,CAAA;IAC/F,CAAC;IAEM,WAAW,CAAE,QAAgB;QAClC,MAAM,UAAU,GAAa,IAAI,CAAC,kBAAkB,CAAA;QACpD,IAAI,CAAC,UAAU,EAAE;YACf,OAAO,IAAI,CAAA;SACZ;QACD,IAAI,QAAQ,GAAG,CAAC,IAAI,QAAQ,IAAI,UAAU,CAAC,MAAM,EAAE;YACjD,OAAO,IAA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,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;IACxE,CAAC;IAEM,iBAAiB,CAAE,GAAW,EAAE,QAAgB;QACrD,IAAI,SAAS,GAAY,KAAK,CAAA;QAC9B,IAAI,IAAI,CAAC,GAAG,YAAY,iCAAoB,EAAE;YAC5C,IAAI,IAAI,CAAC,YAAY,IAAI,GAAG,KAAK,IAAI,CAAC,YAAY,EAAE;gBAClD,SAAS,GAAG,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAA;aAChD;SACF;QACD,OAAO,SAAS,CAAA;IAClB,CAAC;IAEM,GAAG,CAAE,CAAS,EAAE,GAAW,EAAE,MAAc;QAChD,IAAI,CAAC,KAAK,GAAG,CAAC,CAAA;QACd,IAAI,CAAC,YAAY,GAAG,IAAI,CAAA;QACxB,IAAI,CAAC,WAAW,GAAG,GAAG,CAAA;QACtB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;CACF;AA5ED,gDA4EC","sourcesContent":["import { INumericKeyed } from '../../collections/collection'\r\nimport { ContainedField, ContainedFieldSet } from '../../dictionary/contained'\r\nimport { GroupFieldDefinition } from '../../dictionary/definition'\r\nimport { SegmentType } from './segment-type'\r\n\r\nexport class SegmentDescription {\r\n public index: number\r\n public endTag: number = 0\r\n public endPosition: number = 0\r\n public delimiterTag: number = 0\r\n public delimiterPositions: number[]\r\n public currentField: ContainedField\r\n public containedDelimiterPositions: INumericKeyed<boolean>\r\n\r\n constructor (\r\n public name: string,\r\n public startTag: number,\r\n public set: ContainedFieldSet,\r\n public startPosition: number,\r\n public readonly depth: number,\r\n public readonly type: SegmentType) {\r\n }\r\n\r\n public contains (segment: SegmentDescription): boolean {\r\n return segment.startPosition >= this.startPosition && segment.endPosition <= this.endPosition\r\n }\r\n\r\n public getInstance (instance: number): SegmentDescription {\r\n const delimiters: number[] = this.delimiterPositions\r\n if (!delimiters) {\r\n return null\r\n }\r\n if (instance < 0 || instance >= delimiters.length) {\r\n return null\r\n }\r\n const start: number = delimiters[instance]\r\n const end: number = instance < delimiters.length - 1 ?\r\n delimiters[instance + 1] - 1 :\r\n this.endPosition\r\n const name = this.type === SegmentType.Batch ? this.set.abbreviation : this.name\r\n const d: SegmentDescription = new SegmentDescription(name, this.startTag, this.set, start, this.depth, this.type)\r\n d.endPosition = end\r\n d.endTag = this.endTag\r\n return d\r\n }\r\n\r\n public startGroup (tag: number): void {\r\n this.delimiterTag = tag\r\n this.delimiterPositions = []\r\n this.containedDelimiterPositions = {}\r\n }\r\n\r\n public addDelimiterPosition (position: number): boolean {\r\n if (this.containedDelimiterPositions[position]) {\r\n return false\r\n }\r\n this.delimiterPositions[this.delimiterPositions.length] = position\r\n this.containedDelimiterPositions[position] = true\r\n return true\r\n }\r\n\r\n public setCurrentField (tag: number): void {\r\n this.currentField = this.set.localTag[tag] || this.set.tagToField[tag]\r\n }\r\n\r\n public groupAddDelimiter (tag: number, position: number): boolean {\r\n let delimiter: boolean = false\r\n if (this.set instanceof GroupFieldDefinition) {\r\n if (this.delimiterTag && tag === this.delimiterTag) {\r\n delimiter = this.addDelimiterPosition(position)\r\n }\r\n }\r\n return delimiter\r\n }\r\n\r\n public end (i: number, pos: number, endTag: number): void {\r\n this.index = i\r\n this.currentField = null\r\n this.endPosition = pos\r\n this.endTag = endTag\r\n }\r\n}\r\n"]}
@@ -0,0 +1,13 @@
1
+ import { SegmentDescription } from './segment-description';
2
+ export declare class SegmentSummary {
3
+ readonly name: string;
4
+ readonly depth: number;
5
+ readonly startTag: number;
6
+ readonly startPosition: number;
7
+ readonly endTag: number;
8
+ readonly endPosition: number;
9
+ readonly delimiterTag: number;
10
+ readonly delimiterPositions: number[];
11
+ constructor(name: string, depth: number, startTag: number, startPosition: number, endTag: number, endPosition: number, delimiterTag: number, delimiterPositions: number[]);
12
+ static fromDescription(d: SegmentDescription): SegmentSummary;
13
+ }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SegmentSummary = void 0;
4
+ class SegmentSummary {
5
+ constructor(name, depth, startTag, startPosition, endTag, endPosition, delimiterTag, delimiterPositions) {
6
+ this.name = name;
7
+ this.depth = depth;
8
+ this.startTag = startTag;
9
+ this.startPosition = startPosition;
10
+ this.endTag = endTag;
11
+ this.endPosition = endPosition;
12
+ this.delimiterTag = delimiterTag;
13
+ this.delimiterPositions = delimiterPositions;
14
+ }
15
+ static fromDescription(d) {
16
+ return new SegmentSummary(d.set.name, d.depth, d.startTag, d.startPosition, d.endTag, d.endPosition, d.delimiterTag, d.delimiterPositions || []);
17
+ }
18
+ }
19
+ exports.SegmentSummary = SegmentSummary;
20
+ //# sourceMappingURL=segment-summary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"segment-summary.js","sourceRoot":"","sources":["../../../src/buffer/segment/segment-summary.ts"],"names":[],"mappings":";;;AAEA,MAAa,cAAc;IACzB,YACkB,IAAY,EACZ,KAAa,EACb,QAAgB,EAChB,aAAqB,EACrB,MAAc,EACd,WAAmB,EACnB,YAAoB,EACpB,kBAA4B;QAP5B,SAAI,GAAJ,IAAI,CAAQ;QACZ,UAAK,GAAL,KAAK,CAAQ;QACb,aAAQ,GAAR,QAAQ,CAAQ;QAChB,kBAAa,GAAb,aAAa,CAAQ;QACrB,WAAM,GAAN,MAAM,CAAQ;QACd,gBAAW,GAAX,WAAW,CAAQ;QACnB,iBAAY,GAAZ,YAAY,CAAQ;QACpB,uBAAkB,GAAlB,kBAAkB,CAAU;IAC9C,CAAC;IACM,MAAM,CAAC,eAAe,CAAE,CAAqB;QAClD,OAAO,IAAI,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,aAAa,EAClE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC,kBAAkB,IAAI,EAAE,CAAC,CAAA;IAC9E,CAAC;CACF;AAfD,wCAeC","sourcesContent":["import { SegmentDescription } from './segment-description'\r\n\r\nexport class SegmentSummary {\r\n constructor (\r\n public readonly name: string,\r\n public readonly depth: number,\r\n public readonly startTag: number,\r\n public readonly startPosition: number,\r\n public readonly endTag: number,\r\n public readonly endPosition: number,\r\n public readonly delimiterTag: number,\r\n public readonly delimiterPositions: number[]) {\r\n }\r\n public static fromDescription (d: SegmentDescription): SegmentSummary {\r\n return new SegmentSummary(d.set.name, d.depth, d.startTag, d.startPosition,\r\n d.endTag, d.endPosition, d.delimiterTag, d.delimiterPositions || [])\r\n }\r\n}\r\n"]}
@@ -0,0 +1,8 @@
1
+ export declare enum SegmentType {
2
+ Component = 0,
3
+ Group = 1,
4
+ Msg = 2,
5
+ Gap = 3,
6
+ Batch = 4,
7
+ Unknown = 5
8
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SegmentType = void 0;
4
+ var SegmentType;
5
+ (function (SegmentType) {
6
+ SegmentType[SegmentType["Component"] = 0] = "Component";
7
+ SegmentType[SegmentType["Group"] = 1] = "Group";
8
+ SegmentType[SegmentType["Msg"] = 2] = "Msg";
9
+ SegmentType[SegmentType["Gap"] = 3] = "Gap";
10
+ SegmentType[SegmentType["Batch"] = 4] = "Batch";
11
+ SegmentType[SegmentType["Unknown"] = 5] = "Unknown";
12
+ })(SegmentType = exports.SegmentType || (exports.SegmentType = {}));
13
+ //# sourceMappingURL=segment-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"segment-type.js","sourceRoot":"","sources":["../../../src/buffer/segment/segment-type.ts"],"names":[],"mappings":";;;AAAA,IAAY,WAOX;AAPD,WAAY,WAAW;IACrB,uDAAa,CAAA;IACb,+CAAS,CAAA;IACT,2CAAO,CAAA;IACP,2CAAO,CAAA;IACP,+CAAS,CAAA;IACT,mDAAW,CAAA;AACb,CAAC,EAPW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAOtB","sourcesContent":["export enum SegmentType {\r\n Component = 0,\r\n Group = 1,\r\n Msg = 2,\r\n Gap = 3,\r\n Batch = 4,\r\n Unknown = 5\r\n}\r\n"]}
@@ -1,13 +1,6 @@
1
1
  import { INumericKeyed } from '../collections/collection';
2
- import { ContainedField, ContainedFieldSet } from '../dictionary';
3
- export declare enum SegmentType {
4
- Component = 0,
5
- Group = 1,
6
- Msg = 2,
7
- Gap = 3,
8
- Batch = 4,
9
- Unknown = 5
10
- }
2
+ import { ContainedField, ContainedFieldSet } from '../dictionary/contained/';
3
+ import { SegmentType } from './segment-type';
11
4
  export declare class SegmentDescription {
12
5
  name: string;
13
6
  startTag: number;
@@ -1,16 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SegmentDescription = exports.SegmentType = void 0;
4
- const dictionary_1 = require("../dictionary");
5
- var SegmentType;
6
- (function (SegmentType) {
7
- SegmentType[SegmentType["Component"] = 0] = "Component";
8
- SegmentType[SegmentType["Group"] = 1] = "Group";
9
- SegmentType[SegmentType["Msg"] = 2] = "Msg";
10
- SegmentType[SegmentType["Gap"] = 3] = "Gap";
11
- SegmentType[SegmentType["Batch"] = 4] = "Batch";
12
- SegmentType[SegmentType["Unknown"] = 5] = "Unknown";
13
- })(SegmentType = exports.SegmentType || (exports.SegmentType = {}));
3
+ exports.SegmentDescription = void 0;
4
+ const definition_1 = require("../dictionary/definition");
5
+ const segment_type_1 = require("./segment-type");
14
6
  class SegmentDescription {
15
7
  constructor(name, startTag, set, startPosition, depth, type) {
16
8
  this.name = name;
@@ -38,7 +30,7 @@ class SegmentDescription {
38
30
  const end = instance < delimiters.length - 1 ?
39
31
  delimiters[instance + 1] - 1 :
40
32
  this.endPosition;
41
- const name = this.type === SegmentType.Batch ? this.set.abbreviation : this.name;
33
+ const name = this.type === segment_type_1.SegmentType.Batch ? this.set.abbreviation : this.name;
42
34
  const d = new SegmentDescription(name, this.startTag, this.set, start, this.depth, this.type);
43
35
  d.endPosition = end;
44
36
  d.endTag = this.endTag;
@@ -62,7 +54,7 @@ class SegmentDescription {
62
54
  }
63
55
  groupAddDelimiter(tag, position) {
64
56
  let delimiter = false;
65
- if (this.set instanceof dictionary_1.GroupFieldDefinition) {
57
+ if (this.set instanceof definition_1.GroupFieldDefinition) {
66
58
  if (this.delimiterTag && tag === this.delimiterTag) {
67
59
  delimiter = this.addDelimiterPosition(position);
68
60
  }
@@ -1 +1 @@
1
- {"version":3,"file":"segment-description.js","sourceRoot":"","sources":["../../src/buffer/segment-description.ts"],"names":[],"mappings":";;;AACA,8CAAuF;AAEvF,IAAY,WAOX;AAPD,WAAY,WAAW;IACnB,uDAAa,CAAA;IACb,+CAAS,CAAA;IACT,2CAAO,CAAA;IACP,2CAAO,CAAA;IACP,+CAAS,CAAA;IACT,mDAAW,CAAA;AACf,CAAC,EAPW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAOtB;AAED,MAAa,kBAAkB;IAS7B,YACoB,IAAY,EACZ,QAAgB,EAChB,GAAsB,EACtB,aAAqB,EACZ,KAAa,EACb,IAAiB;QAL1B,SAAI,GAAJ,IAAI,CAAQ;QACZ,aAAQ,GAAR,QAAQ,CAAQ;QAChB,QAAG,GAAH,GAAG,CAAmB;QACtB,kBAAa,GAAb,aAAa,CAAQ;QACZ,UAAK,GAAL,KAAK,CAAQ;QACb,SAAI,GAAJ,IAAI,CAAa;QAbvC,WAAM,GAAW,CAAC,CAAA;QAClB,gBAAW,GAAW,CAAC,CAAA;QACvB,iBAAY,GAAW,CAAC,CAAA;IAY/B,CAAC;IAEM,QAAQ,CAAE,OAA2B;QAC1C,OAAO,OAAO,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,IAAI,OAAO,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,CAAA;IAC/F,CAAC;IAEM,WAAW,CAAE,QAA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AI,CAAC,kBAAkB,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAA;QAClE,IAAI,CAAC,2BAA2B,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAA;QACjD,OAAO,IAAI,CAAA;IACb,CAAC;IAEM,eAAe,CAAE,GAAW;QACjC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;IACxE,CAAC;IAEM,iBAAiB,CAAE,GAAW,EAAE,QAAgB;QACrD,IAAI,SAAS,GAAY,KAAK,CAAA;QAC9B,IAAI,IAAI,CAAC,GAAG,YAAY,iCAAoB,EAAE;YAC5C,IAAI,IAAI,CAAC,YAAY,IAAI,GAAG,KAAK,IAAI,CAAC,YAAY,EAAE;gBAClD,SAAS,GAAG,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAA;aAChD;SACF;QACD,OAAO,SAAS,CAAA;IAClB,CAAC;IAEM,GAAG,CAAE,CAAS,EAAE,GAAW,EAAE,MAAc;QAChD,IAAI,CAAC,KAAK,GAAG,CAAC,CAAA;QACd,IAAI,CAAC,YAAY,GAAG,IAAI,CAAA;QACxB,IAAI,CAAC,WAAW,GAAG,GAAG,CAAA;QACtB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;CACF;AA5ED,gDA4EC","sourcesContent":["import { INumericKeyed } from '../collections/collection'\r\nimport { ContainedField, ContainedFieldSet, GroupFieldDefinition } from '../dictionary'\r\n\r\nexport enum SegmentType {\r\n Component = 0,\r\n Group = 1,\r\n Msg = 2,\r\n Gap = 3,\r\n Batch = 4,\r\n Unknown = 5\r\n}\r\n\r\nexport class SegmentDescription {\r\n public index: number\r\n public endTag: number = 0\r\n public endPosition: number = 0\r\n public delimiterTag: number = 0\r\n public delimiterPositions: number[]\r\n public currentField: ContainedField\r\n public containedDelimiterPositions: INumericKeyed<boolean>\r\n\r\n constructor (\r\n public name: string,\r\n public startTag: number,\r\n public set: ContainedFieldSet,\r\n public startPosition: number,\r\n public readonly depth: number,\r\n public readonly type: SegmentType) {\r\n }\r\n\r\n public contains (segment: SegmentDescription): boolean {\r\n return segment.startPosition >= this.startPosition && segment.endPosition <= this.endPosition\r\n }\r\n\r\n public getInstance (instance: number): SegmentDescription {\r\n const delimiters: number[] = this.delimiterPositions\r\n if (!delimiters) {\r\n return null\r\n }\r\n if (instance < 0 || instance >= delimiters.length) {\r\n return null\r\n }\r\n const start: number = delimiters[instance]\r\n const end: number = instance < delimiters.length - 1 ?\r\n delimiters[instance + 1] - 1 :\r\n this.endPosition\r\n const name = this.type === SegmentType.Batch ? this.set.abbreviation : this.name\r\n const d: SegmentDescription = new SegmentDescription(name, this.startTag, this.set, start, this.depth, this.type)\r\n d.endPosition = end\r\n d.endTag = this.endTag\r\n return d\r\n }\r\n\r\n public startGroup (tag: number): void {\r\n this.delimiterTag = tag\r\n this.delimiterPositions = []\r\n this.containedDelimiterPositions = {}\r\n }\r\n\r\n public addDelimiterPosition (position: number): boolean {\r\n if (this.containedDelimiterPositions[position]) {\r\n return false\r\n }\r\n this.delimiterPositions[this.delimiterPositions.length] = position\r\n this.containedDelimiterPositions[position] = true\r\n return true\r\n }\r\n\r\n public setCurrentField (tag: number): void {\r\n this.currentField = this.set.localTag[tag] || this.set.tagToField[tag]\r\n }\r\n\r\n public groupAddDelimiter (tag: number, position: number): boolean {\r\n let delimiter: boolean = false\r\n if (this.set instanceof GroupFieldDefinition) {\r\n if (this.delimiterTag && tag === this.delimiterTag) {\r\n delimiter = this.addDelimiterPosition(position)\r\n }\r\n }\r\n return delimiter\r\n }\r\n\r\n public end (i: number, pos: number, endTag: number): void {\r\n this.index = i\r\n this.currentField = null\r\n this.endPosition = pos\r\n this.endTag = endTag\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"segment-description.js","sourceRoot":"","sources":["../../src/buffer/segment-description.ts"],"names":[],"mappings":";;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AAA;IAClB,CAAC;IAEM,GAAG,CAAE,CAAS,EAAE,GAAW,EAAE,MAAc;QAChD,IAAI,CAAC,KAAK,GAAG,CAAC,CAAA;QACd,IAAI,CAAC,YAAY,GAAG,IAAI,CAAA;QACxB,IAAI,CAAC,WAAW,GAAG,GAAG,CAAA;QACtB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;CACF;AA5ED,gDA4EC","sourcesContent":["import { INumericKeyed } from '../collections/collection'\r\nimport { ContainedField, ContainedFieldSet } from '../dictionary/contained/'\r\nimport { GroupFieldDefinition } from '../dictionary/definition'\r\nimport { SegmentType } from './segment-type'\r\n\r\nexport class SegmentDescription {\r\n public index: number\r\n public endTag: number = 0\r\n public endPosition: number = 0\r\n public delimiterTag: number = 0\r\n public delimiterPositions: number[]\r\n public currentField: ContainedField\r\n public containedDelimiterPositions: INumericKeyed<boolean>\r\n\r\n constructor (\r\n public name: string,\r\n public startTag: number,\r\n public set: ContainedFieldSet,\r\n public startPosition: number,\r\n public readonly depth: number,\r\n public readonly type: SegmentType) {\r\n }\r\n\r\n public contains (segment: SegmentDescription): boolean {\r\n return segment.startPosition >= this.startPosition && segment.endPosition <= this.endPosition\r\n }\r\n\r\n public getInstance (instance: number): SegmentDescription {\r\n const delimiters: number[] = this.delimiterPositions\r\n if (!delimiters) {\r\n return null\r\n }\r\n if (instance < 0 || instance >= delimiters.length) {\r\n return null\r\n }\r\n const start: number = delimiters[instance]\r\n const end: number = instance < delimiters.length - 1 ?\r\n delimiters[instance + 1] - 1 :\r\n this.endPosition\r\n const name = this.type === SegmentType.Batch ? this.set.abbreviation : this.name\r\n const d: SegmentDescription = new SegmentDescription(name, this.startTag, this.set, start, this.depth, this.type)\r\n d.endPosition = end\r\n d.endTag = this.endTag\r\n return d\r\n }\r\n\r\n public startGroup (tag: number): void {\r\n this.delimiterTag = tag\r\n this.delimiterPositions = []\r\n this.containedDelimiterPositions = {}\r\n }\r\n\r\n public addDelimiterPosition (position: number): boolean {\r\n if (this.containedDelimiterPositions[position]) {\r\n return false\r\n }\r\n this.delimiterPositions[this.delimiterPositions.length] = position\r\n this.containedDelimiterPositions[position] = true\r\n return true\r\n }\r\n\r\n public setCurrentField (tag: number): void {\r\n this.currentField = this.set.localTag[tag] || this.set.tagToField[tag]\r\n }\r\n\r\n public groupAddDelimiter (tag: number, position: number): boolean {\r\n let delimiter: boolean = false\r\n if (this.set instanceof GroupFieldDefinition) {\r\n if (this.delimiterTag && tag === this.delimiterTag) {\r\n delimiter = this.addDelimiterPosition(position)\r\n }\r\n }\r\n return delimiter\r\n }\r\n\r\n public end (i: number, pos: number, endTag: number): void {\r\n this.index = i\r\n this.currentField = null\r\n this.endPosition = pos\r\n this.endTag = endTag\r\n }\r\n}\r\n"]}
@@ -0,0 +1,8 @@
1
+ export declare enum SegmentType {
2
+ Component = 0,
3
+ Group = 1,
4
+ Msg = 2,
5
+ Gap = 3,
6
+ Batch = 4,
7
+ Unknown = 5
8
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SegmentType = void 0;
4
+ var SegmentType;
5
+ (function (SegmentType) {
6
+ SegmentType[SegmentType["Component"] = 0] = "Component";
7
+ SegmentType[SegmentType["Group"] = 1] = "Group";
8
+ SegmentType[SegmentType["Msg"] = 2] = "Msg";
9
+ SegmentType[SegmentType["Gap"] = 3] = "Gap";
10
+ SegmentType[SegmentType["Batch"] = 4] = "Batch";
11
+ SegmentType[SegmentType["Unknown"] = 5] = "Unknown";
12
+ })(SegmentType = exports.SegmentType || (exports.SegmentType = {}));
13
+ //# sourceMappingURL=segment-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"segment-type.js","sourceRoot":"","sources":["../../src/buffer/segment-type.ts"],"names":[],"mappings":";;;AAAA,IAAY,WAOX;AAPD,WAAY,WAAW;IACrB,uDAAa,CAAA;IACb,+CAAS,CAAA;IACT,2CAAO,CAAA;IACP,2CAAO,CAAA;IACP,+CAAS,CAAA;IACT,mDAAW,CAAA;AACb,CAAC,EAPW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAOtB","sourcesContent":["export enum SegmentType {\r\n Component = 0,\r\n Group = 1,\r\n Msg = 2,\r\n Gap = 3,\r\n Batch = 4,\r\n Unknown = 5\r\n}\r\n"]}
@@ -1,7 +1,7 @@
1
1
  import { ILooseObject } from '../collections/collection';
2
- import { SegmentDescription } from './segment-description';
3
- import { SegmentSummary } from './segment-summary';
4
- import { Tags } from './tags';
2
+ import { SegmentDescription } from './segment/segment-description';
3
+ import { SegmentSummary } from './segment/segment-summary';
4
+ import { Tags } from './tag/tags';
5
5
  export declare class Structure {
6
6
  readonly tags: Tags;
7
7
  readonly segments: SegmentDescription[];
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Structure = void 0;
4
- const segment_summary_1 = require("./segment-summary");
4
+ const segment_summary_1 = require("./segment/segment-summary");
5
5
  class Structure {
6
6
  constructor(tags, segments) {
7
7
  this.tags = tags;
@@ -1 +1 @@
1
- {"version":3,"file":"structure.js","sourceRoot":"","sources":["../../src/buffer/structure.ts"],"names":[],"mappings":";;;AAEA,uDAAkD;AAGlD,MAAa,SAAS;IAGpB,YAA6B,IAAU,EACV,QAA8B;QAD9B,SAAI,GAAJ,IAAI,CAAM;QACV,aAAQ,GAAR,QAAQ,CAAsB;QAH3C,WAAM,GAAiB,IAAI,CAAA;QAIzC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,WAAW,EAAE,CAAA;IAClC,CAAC;IAEM,GAAG;QAER,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;IAChD,CAAC;IAEM,OAAO;QACZ,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAqB,EAAE,EAAE,CAAC,gCAAc,CAAC,eAAe,CAAC,CAAC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AE,OAAO,CAAC,CAAA;iBAC5B;qBAAM;oBACL,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,OAAO,CAAA;iBAChC;aACF;YACD,OAAO,CAAC,CAAA;QACV,CAAC,EAAE,EAAE,CAAC,CAAA;IACR,CAAC;CACF;AAxDD,8BAwDC","sourcesContent":["import { ILooseObject } from '../collections/collection'\r\nimport { SegmentDescription } from './segment-description'\r\nimport { SegmentSummary } from './segment-summary'\r\nimport { Tags } from './tags'\r\n\r\nexport class Structure {\r\n public readonly layout: ILooseObject = null\r\n\r\n constructor (public readonly tags: Tags,\r\n public readonly segments: SegmentDescription[]) {\r\n this.layout = this.boundLayout()\r\n }\r\n\r\n public msg (): SegmentDescription {\r\n // trailer = -1, msg = -2\r\n return this.segments[this.segments.length - 2]\r\n }\r\n\r\n public summary (): SegmentSummary[] {\r\n return this.segments.map(((s: SegmentDescription) => SegmentSummary.fromDescription(s)))\r\n }\r\n\r\n public firstContainedWithin (name: string, segment: SegmentDescription): SegmentDescription {\r\n const all: SegmentDescription | SegmentDescription[] = this.layout[name]\r\n if (!all) {\r\n return null\r\n }\r\n let ret: SegmentDescription = null\r\n if (!Array.isArray(all)) {\r\n const instance: SegmentDescription = all\r\n ret = segment.contains(instance) ? instance : null\r\n } else {\r\n for (const instance of all) {\r\n ret = segment.contains(instance) ? instance : null\r\n if (ret) {\r\n break\r\n }\r\n }\r\n }\r\n return ret\r\n }\r\n\r\n public boundLayout (segment?: SegmentDescription): ILooseObject {\r\n return this.segments.reduce((a: ILooseObject, current: SegmentDescription) => {\r\n if (segment && !segment.contains(current)) {\r\n return a\r\n }\r\n const name: string = current.name\r\n const member: SegmentDescription | SegmentDescription[] = a[name]\r\n if (!member) {\r\n a[name] = current\r\n } else {\r\n if (!Array.isArray(member)) {\r\n a[name] = [member, current]\r\n } else {\r\n member[member.length] = current\r\n }\r\n }\r\n return a\r\n }, {})\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"structure.js","sourceRoot":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EM,WAAW,CAAE,OAA4B;QAC9C,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAe,EAAE,OAA2B,EAAE,EAAE;YAC3E,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;gBACzC,OAAO,CAAC,CAAA;aACT;YACD,MAAM,IAAI,GAAW,OAAO,CAAC,IAAI,CAAA;YACjC,MAAM,MAAM,GAA8C,CAAC,CAAC,IAAI,CAAC,CAAA;YACjE,IAAI,CAAC,MAAM,EAAE;gBACX,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAA;aAClB;iBAAM;gBACL,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;oBAC1B,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;iBAC5B;qBAAM;oBACL,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,OAAO,CAAA;iBAChC;aACF;YACD,OAAO,CAAC,CAAA;QACV,CAAC,EAAE,EAAE,CAAC,CAAA;IACR,CAAC;CACF;AAxDD,8BAwDC","sourcesContent":["import { ILooseObject } from '../collections/collection'\r\nimport { SegmentDescription } from './segment/segment-description'\r\nimport { SegmentSummary } from './segment/segment-summary'\r\nimport { Tags } from './tag/tags'\r\n\r\nexport class Structure {\r\n public readonly layout: ILooseObject = null\r\n\r\n constructor (public readonly tags: Tags,\r\n public readonly segments: SegmentDescription[]) {\r\n this.layout = this.boundLayout()\r\n }\r\n\r\n public msg (): SegmentDescription {\r\n // trailer = -1, msg = -2\r\n return this.segments[this.segments.length - 2]\r\n }\r\n\r\n public summary (): SegmentSummary[] {\r\n return this.segments.map(((s: SegmentDescription) => SegmentSummary.fromDescription(s)))\r\n }\r\n\r\n public firstContainedWithin (name: string, segment: SegmentDescription): SegmentDescription {\r\n const all: SegmentDescription | SegmentDescription[] = this.layout[name]\r\n if (!all) {\r\n return null\r\n }\r\n let ret: SegmentDescription = null\r\n if (!Array.isArray(all)) {\r\n const instance: SegmentDescription = all\r\n ret = segment.contains(instance) ? instance : null\r\n } else {\r\n for (const instance of all) {\r\n ret = segment.contains(instance) ? instance : null\r\n if (ret) {\r\n break\r\n }\r\n }\r\n }\r\n return ret\r\n }\r\n\r\n public boundLayout (segment?: SegmentDescription): ILooseObject {\r\n return this.segments.reduce((a: ILooseObject, current: SegmentDescription) => {\r\n if (segment && !segment.contains(current)) {\r\n return a\r\n }\r\n const name: string = current.name\r\n const member: SegmentDescription | SegmentDescription[] = a[name]\r\n if (!member) {\r\n a[name] = current\r\n } else {\r\n if (!Array.isArray(member)) {\r\n a[name] = [member, current]\r\n } else {\r\n member[member.length] = current\r\n }\r\n }\r\n return a\r\n }, {})\r\n }\r\n}\r\n"]}
@@ -0,0 +1,12 @@
1
+ export declare class TagPos {
2
+ position: number;
3
+ tag: number;
4
+ start: number;
5
+ len: number;
6
+ constructor(position: number, tag: number, start: number, len: number);
7
+ static compare(lhs: TagPos, rhs: TagPos): number;
8
+ static binarySearch(ar: TagPos[], tag: number): number;
9
+ assign(position: number, tag: number, start: number, len: number): void;
10
+ toString(): string;
11
+ clone(): TagPos;
12
+ }
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TagPos = void 0;
4
+ class TagPos {
5
+ constructor(position, tag, start, len) {
6
+ this.position = position;
7
+ this.tag = tag;
8
+ this.start = start;
9
+ this.len = len;
10
+ }
11
+ static compare(lhs, rhs) {
12
+ if (lhs.tag < rhs.tag) {
13
+ return -1;
14
+ }
15
+ if (lhs.tag > rhs.tag) {
16
+ return 1;
17
+ }
18
+ if (lhs.tag === rhs.tag && lhs.start === rhs.start) {
19
+ return 0;
20
+ }
21
+ return ((lhs.start < rhs.start) ? -1 : ((lhs.start > rhs.start) ? 1 : 0));
22
+ }
23
+ static binarySearch(ar, tag) {
24
+ let m = 0;
25
+ let n = ar.length - 1;
26
+ while (m <= n) {
27
+ const k = (n + m) >> 1;
28
+ const cmp = tag - (ar[k].tag);
29
+ if (cmp > 0) {
30
+ m = k + 1;
31
+ }
32
+ else if (cmp < 0) {
33
+ n = k - 1;
34
+ }
35
+ else {
36
+ return k;
37
+ }
38
+ }
39
+ return -m - 1;
40
+ }
41
+ assign(position, tag, start, len) {
42
+ this.position = position;
43
+ this.tag = tag;
44
+ this.start = start;
45
+ this.len = len;
46
+ }
47
+ toString() {
48
+ return `[${this.position}] = ${this.tag} (${this.start}..${this.start + this.len})`;
49
+ }
50
+ clone() {
51
+ return new TagPos(this.position, this.tag, this.start, this.len);
52
+ }
53
+ }
54
+ exports.TagPos = TagPos;
55
+ //# sourceMappingURL=tag-pos.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tag-pos.js","sourceRoot":"","sources":["../../../src/buffer/tag/tag-pos.ts"],"names":[],"mappings":";;;AAAA,MAAa,MAAM;IACjB,YAAoB,QAAgB,EAAS,GAAW,EAAS,KAAa,EAAS,GAAW;QAA9E,aAAQ,GAAR,QAAQ,CAAQ;QAAS,QAAG,GAAH,GAAG,CAAQ;QAAS,UAAK,GAAL,KAAK,CAAQ;QAAS,QAAG,GAAH,GAAG,CAAQ;IAClG,CAAC;IAEM,MAAM,CAAC,OAAO,CAAE,GAAW,EAAE,GAAW;QAC7C,IAAI,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,EAAE;YACrB,OAAO,CAAC,CAAC,CAAA;SACV;QACD,IAAI,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,EAAE;YACrB,OAAO,CAAC,CAAA;SACT;QACD,IAAI,GAAG,CAAC,GAAG,KAAK,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,KAAK,GAAG,CAAC,KAAK,EAAE;YAClD,OAAO,CAAC,CAAA;SACT;QACD,OAAO,CAAC,CAAC,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CA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CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAA;IAClE,CAAC;CACF;AAhDD,wBAgDC","sourcesContent":["export class TagPos {\r\n constructor (public position: number, public tag: number, public start: number, public len: number) {\r\n }\r\n\r\n public static compare (lhs: TagPos, rhs: TagPos): number {\r\n if (lhs.tag < rhs.tag) {\r\n return -1\r\n }\r\n if (lhs.tag > rhs.tag) {\r\n return 1\r\n }\r\n if (lhs.tag === rhs.tag && lhs.start === rhs.start) {\r\n return 0\r\n }\r\n return ((lhs.start < rhs.start) ? -1 : ((lhs.start > rhs.start) ? 1 : 0))\r\n }\r\n\r\n public static binarySearch (ar: TagPos[], tag: number): number {\r\n let m: number = 0\r\n let n: number = ar.length - 1\r\n while (m <= n) {\r\n const k: number = (n + m) >> 1\r\n const cmp: number = tag - (ar[k].tag)\r\n if (cmp > 0) {\r\n m = k + 1\r\n } else if (cmp < 0) {\r\n n = k - 1\r\n } else {\r\n return k\r\n }\r\n }\r\n return -m - 1\r\n }\r\n\r\n public assign (position: number, tag: number, start: number, len: number): void {\r\n this.position = position\r\n this.tag = tag\r\n this.start = start\r\n this.len = len\r\n }\r\n\r\n public toString (): string {\r\n return `[${this.position}] = ${this.tag} (${this.start}..${this.start + this.len})`\r\n }\r\n\r\n public clone (): TagPos {\r\n return new TagPos(this.position, this.tag, this.start, this.len)\r\n }\r\n}\r\n"]}
@@ -0,0 +1,13 @@
1
+ export declare enum TagType {
2
+ String = 1,
3
+ Int = 2,
4
+ Float = 3,
5
+ Boolean = 4,
6
+ UtcTimestamp = 5,
7
+ UtcDateOnly = 6,
8
+ UtcTimeOnly = 7,
9
+ LocalDate = 8,
10
+ RawData = 9,
11
+ Length = 10,
12
+ Unknown = 11
13
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TagType = void 0;
4
+ var TagType;
5
+ (function (TagType) {
6
+ TagType[TagType["String"] = 1] = "String";
7
+ TagType[TagType["Int"] = 2] = "Int";
8
+ TagType[TagType["Float"] = 3] = "Float";
9
+ TagType[TagType["Boolean"] = 4] = "Boolean";
10
+ TagType[TagType["UtcTimestamp"] = 5] = "UtcTimestamp";
11
+ TagType[TagType["UtcDateOnly"] = 6] = "UtcDateOnly";
12
+ TagType[TagType["UtcTimeOnly"] = 7] = "UtcTimeOnly";
13
+ TagType[TagType["LocalDate"] = 8] = "LocalDate";
14
+ TagType[TagType["RawData"] = 9] = "RawData";
15
+ TagType[TagType["Length"] = 10] = "Length";
16
+ TagType[TagType["Unknown"] = 11] = "Unknown";
17
+ })(TagType = exports.TagType || (exports.TagType = {}));
18
+ //# sourceMappingURL=tag-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tag-type.js","sourceRoot":"","sources":["../../../src/buffer/tag/tag-type.ts"],"names":[],"mappings":";;;AAAA,IAAY,OAYX;AAZD,WAAY,OAAO;IACjB,yCAAU,CAAA;IACV,mCAAO,CAAA;IACP,uCAAS,CAAA;IACT,2CAAW,CAAA;IACX,qDAAgB,CAAA;IAChB,mDAAe,CAAA;IACf,mDAAe,CAAA;IACf,+CAAa,CAAA;IACb,2CAAW,CAAA;IACX,0CAAW,CAAA;IACX,4CAAY,CAAA;AACd,CAAC,EAZW,OAAO,GAAP,eAAO,KAAP,eAAO,QAYlB","sourcesContent":["export enum TagType {\r\n String = 1,\r\n Int = 2,\r\n Float = 3,\r\n Boolean = 4,\r\n UtcTimestamp = 5,\r\n UtcDateOnly = 6,\r\n UtcTimeOnly = 7,\r\n LocalDate = 8,\r\n RawData = 9,\r\n Length = 10,\r\n Unknown = 11\r\n}\r\n"]}
@@ -0,0 +1,21 @@
1
+ import { FixDefinitions } from '../../dictionary/definition';
2
+ import { ContainedSimpleField } from '../../dictionary/contained';
3
+ import { TagPos } from './tag-pos';
4
+ import { TagType } from './tag-type';
5
+ export declare class Tags {
6
+ readonly definitions: FixDefinitions;
7
+ readonly startingLength: number;
8
+ static readonly BeginString: number;
9
+ static readonly BodyLengthTag: number;
10
+ static readonly CheckSumTag: number;
11
+ static readonly MsgTag: number;
12
+ tagPos: TagPos[];
13
+ nextTagPos: number;
14
+ constructor(definitions: FixDefinitions, startingLength?: number);
15
+ static toJSType(simple: ContainedSimpleField): string;
16
+ static toType(type: string): TagType;
17
+ clone(): Tags;
18
+ reset(): void;
19
+ store(start: number, len: number, tag: number): void;
20
+ private expand;
21
+ }