jspurefix 1.4.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/appveyor.yml +3 -0
- package/data/session/certs/ca/ca.crt +33 -0
- package/data/session/certs/ca/ca.key +54 -0
- package/data/session/certs/client/client.crt +31 -0
- package/data/session/certs/client/client.key +51 -0
- package/data/session/certs/server/server.crt +31 -0
- package/data/session/certs/server/server.key +51 -0
- package/dist/a-session-msg-factory.d.ts +0 -0
- package/dist/a-session-msg-factory.js +1 -0
- package/dist/a-session-msg-factory.js.map +1 -0
- package/dist/ascii-encoder.test.d.ts +0 -0
- package/dist/ascii-encoder.test.js +1 -0
- package/dist/ascii-encoder.test.js.map +1 -0
- package/dist/ascii-parser.test.d.ts +0 -0
- package/dist/ascii-parser.test.js +1 -0
- package/dist/ascii-parser.test.js.map +1 -0
- package/dist/ascii-segment.test.d.ts +0 -0
- package/dist/ascii-segment.test.js +1 -0
- package/dist/ascii-segment.test.js.map +1 -0
- package/dist/ascii-store-replay.test.d.ts +0 -0
- package/dist/ascii-store-replay.test.js +1 -0
- package/dist/ascii-store-replay.test.js.map +1 -0
- package/dist/ascii-tag-pos.test.d.ts +0 -0
- package/dist/ascii-tag-pos.test.js +1 -0
- package/dist/ascii-tag-pos.test.js.map +1 -0
- package/dist/buffer/{ascii-chars.d.ts → ascii/ascii-chars.d.ts} +0 -0
- package/dist/buffer/{ascii-chars.js → ascii/ascii-chars.js} +0 -0
- package/dist/buffer/ascii/ascii-chars.js.map +1 -0
- package/dist/buffer/ascii/ascii-encoder.d.ts +4 -2
- package/dist/buffer/ascii/ascii-encoder.js +54 -32
- package/dist/buffer/ascii/ascii-encoder.js.map +1 -1
- package/dist/buffer/ascii/ascii-parser-state.d.ts +3 -10
- package/dist/buffer/ascii/ascii-parser-state.js +37 -25
- package/dist/buffer/ascii/ascii-parser-state.js.map +1 -1
- package/dist/buffer/ascii/ascii-parser.d.ts +7 -7
- package/dist/buffer/ascii/ascii-parser.js +50 -24
- package/dist/buffer/ascii/ascii-parser.js.map +1 -1
- package/dist/buffer/ascii/ascii-segment-parser.d.ts +2 -2
- package/dist/buffer/ascii/ascii-segment-parser.js +34 -13
- package/dist/buffer/ascii/ascii-segment-parser.js.map +1 -1
- package/dist/buffer/ascii/ascii-view.d.ts +2 -4
- package/dist/buffer/ascii/ascii-view.js +11 -15
- package/dist/buffer/ascii/ascii-view.js.map +1 -1
- package/dist/buffer/ascii/index.d.ts +1 -0
- package/dist/buffer/ascii/index.js +1 -0
- package/dist/buffer/ascii/index.js.map +1 -1
- package/dist/buffer/ascii/parse-state.d.ts +8 -0
- package/dist/buffer/ascii/parse-state.js +13 -0
- package/dist/buffer/ascii/parse-state.js.map +1 -0
- package/dist/buffer/ascii/time-formatter.js +1 -1
- package/dist/buffer/ascii/time-formatter.js.map +1 -1
- package/dist/buffer/elastic-buffer.js +29 -8
- package/dist/buffer/elastic-buffer.js.map +1 -1
- package/dist/buffer/encode-proxy.d.ts +1 -1
- package/dist/buffer/encode-proxy.js +16 -17
- package/dist/buffer/encode-proxy.js.map +1 -1
- package/dist/buffer/fixml/fixml-encoder.d.ts +2 -1
- package/dist/buffer/fixml/fixml-encoder.js +43 -20
- package/dist/buffer/fixml/fixml-encoder.js.map +1 -1
- package/dist/buffer/fixml/fixml-parser.js +47 -24
- package/dist/buffer/fixml/fixml-parser.js.map +1 -1
- package/dist/buffer/fixml/fixml-view.d.ts +2 -4
- package/dist/buffer/fixml/fixml-view.js +13 -16
- package/dist/buffer/fixml/fixml-view.js.map +1 -1
- package/dist/buffer/fixml/populated-attributes.d.ts +5 -0
- package/dist/buffer/fixml/populated-attributes.js +3 -0
- package/dist/buffer/fixml/populated-attributes.js.map +1 -0
- package/dist/buffer/index.d.ts +4 -8
- package/dist/buffer/index.js +4 -8
- package/dist/buffer/index.js.map +1 -1
- package/dist/buffer/msg-encoder.d.ts +2 -1
- package/dist/buffer/msg-encoder.js.map +1 -1
- package/dist/buffer/msg-view.d.ts +3 -5
- package/dist/buffer/msg-view.js +8 -5
- package/dist/buffer/msg-view.js.map +1 -1
- package/dist/buffer/segment/segment-description.d.ts +26 -0
- package/dist/buffer/segment/segment-description.js +72 -0
- package/dist/buffer/segment/segment-description.js.map +1 -0
- package/dist/buffer/segment/segment-summary.d.ts +13 -0
- package/dist/buffer/segment/segment-summary.js +20 -0
- package/dist/buffer/segment/segment-summary.js.map +1 -0
- package/dist/buffer/segment/segment-type.d.ts +8 -0
- package/dist/buffer/segment/segment-type.js +13 -0
- package/dist/buffer/segment/segment-type.js.map +1 -0
- package/dist/buffer/segment-description.d.ts +2 -9
- package/dist/buffer/segment-description.js +5 -13
- package/dist/buffer/segment-description.js.map +1 -1
- package/dist/buffer/segment-type.d.ts +8 -0
- package/dist/buffer/segment-type.js +13 -0
- package/dist/buffer/segment-type.js.map +1 -0
- package/dist/buffer/structure.d.ts +3 -3
- package/dist/buffer/structure.js +1 -1
- package/dist/buffer/structure.js.map +1 -1
- package/dist/buffer/tag/tag-pos.d.ts +12 -0
- package/dist/buffer/tag/tag-pos.js +55 -0
- package/dist/buffer/tag/tag-pos.js.map +1 -0
- package/dist/buffer/tag/tag-type.d.ts +13 -0
- package/dist/buffer/tag/tag-type.js +18 -0
- package/dist/buffer/tag/tag-type.js.map +1 -0
- package/dist/buffer/tag/tags.d.ts +21 -0
- package/dist/buffer/tag/tags.js +122 -0
- package/dist/buffer/tag/tags.js.map +1 -0
- package/dist/buffer/tag-type.d.ts +13 -0
- package/dist/buffer/tag-type.js +18 -0
- package/dist/buffer/tag-type.js.map +1 -0
- package/dist/buffer/tags.d.ts +3 -14
- package/dist/buffer/tags.js +23 -36
- package/dist/buffer/tags.js.map +1 -1
- package/dist/config/get-js-fx-logger.d.ts +4 -0
- package/dist/{transport/make-fixl-session.js → config/get-js-fx-logger.js} +1 -1
- package/dist/config/get-js-fx-logger.js.map +1 -0
- package/dist/config/index.d.ts +1 -0
- package/dist/config/index.js +1 -0
- package/dist/config/index.js.map +1 -1
- package/dist/config/js-fix-config.d.ts +4 -1
- package/dist/config/js-fix-config.js +3 -3
- package/dist/config/js-fix-config.js.map +1 -1
- package/dist/config/js-fix-logger.d.ts +0 -3
- package/dist/config/js-fix-logger.js.map +1 -1
- package/dist/dict-parser.js +28 -23
- package/dist/dict-parser.js.map +1 -1
- package/dist/dictionary/compiler/compiler-type.js +7 -7
- package/dist/dictionary/compiler/compiler-type.js.map +1 -1
- package/dist/dictionary/compiler/enum-compiler.d.ts +1 -0
- package/dist/dictionary/compiler/enum-compiler.js +11 -1
- package/dist/dictionary/compiler/enum-compiler.js.map +1 -1
- package/dist/dictionary/compiler/msg-compiler.js +8 -6
- package/dist/dictionary/compiler/msg-compiler.js.map +1 -1
- package/dist/dictionary/contained/contained-component-field.js +2 -1
- package/dist/dictionary/contained/contained-component-field.js.map +1 -1
- package/dist/dictionary/contained/contained-field-dispatch.d.ts +1 -14
- package/dist/dictionary/contained/contained-field-dispatch.js +4 -4
- package/dist/dictionary/contained/contained-field-dispatch.js.map +1 -1
- package/dist/dictionary/contained/contained-field-dispatcher.d.ts +14 -0
- package/dist/dictionary/contained/contained-field-dispatcher.js +3 -0
- package/dist/dictionary/contained/contained-field-dispatcher.js.map +1 -0
- package/dist/dictionary/contained/contained-field-set.d.ts +1 -1
- package/dist/dictionary/contained/contained-field-set.js +12 -11
- package/dist/dictionary/contained/contained-field-set.js.map +1 -1
- package/dist/dictionary/contained/contained-field-type.d.ts +5 -0
- package/dist/dictionary/contained/contained-field-type.js +10 -0
- package/dist/dictionary/contained/contained-field-type.js.map +1 -0
- package/dist/dictionary/contained/contained-field.d.ts +1 -5
- package/dist/dictionary/contained/contained-field.js +1 -7
- package/dist/dictionary/contained/contained-field.js.map +1 -1
- package/dist/dictionary/contained/contained-group-field.js +2 -1
- package/dist/dictionary/contained/contained-group-field.js.map +1 -1
- package/dist/dictionary/contained/contained-simple-field.js +2 -1
- package/dist/dictionary/contained/contained-simple-field.js.map +1 -1
- package/dist/dictionary/{fields-dispatch.d.ts → contained/field-dispatcher.d.ts} +3 -2
- package/dist/dictionary/contained/field-dispatcher.js +3 -0
- package/dist/dictionary/contained/field-dispatcher.js.map +1 -0
- package/dist/dictionary/contained/fields-dispatch.d.ts +6 -0
- package/dist/dictionary/contained/fields-dispatch.js +42 -0
- package/dist/dictionary/contained/fields-dispatch.js.map +1 -0
- package/dist/dictionary/contained/index.d.ts +2 -0
- package/dist/dictionary/contained/index.js +2 -0
- package/dist/dictionary/contained/index.js.map +1 -1
- package/dist/dictionary/contained-set-type.d.ts +5 -0
- package/dist/dictionary/contained-set-type.js +10 -0
- package/dist/dictionary/contained-set-type.js.map +1 -0
- package/dist/dictionary/definition/component-field-definition.js +2 -2
- package/dist/dictionary/definition/component-field-definition.js.map +1 -1
- package/dist/dictionary/definition/fix-definitions.d.ts +2 -1
- package/dist/dictionary/definition/fix-definitions.js.map +1 -1
- package/dist/dictionary/definition/group-field-definition.js +2 -2
- package/dist/dictionary/definition/group-field-definition.js.map +1 -1
- package/dist/dictionary/definition/index.d.ts +0 -1
- package/dist/dictionary/definition/index.js +0 -1
- package/dist/dictionary/definition/index.js.map +1 -1
- package/dist/dictionary/definition/message-definition.js +2 -2
- package/dist/dictionary/definition/message-definition.js.map +1 -1
- package/dist/dictionary/definition/simple-field-definition.d.ts +1 -1
- package/dist/dictionary/definition/simple-field-definition.js +5 -4
- package/dist/dictionary/definition/simple-field-definition.js.map +1 -1
- package/dist/dictionary/dict-primitive.d.ts +0 -11
- package/dist/dictionary/dict-primitive.js +0 -7
- package/dist/dictionary/dict-primitive.js.map +1 -1
- package/dist/dictionary/fix-definition-source.d.ts +6 -0
- package/dist/dictionary/fix-definition-source.js +11 -0
- package/dist/dictionary/fix-definition-source.js.map +1 -0
- package/dist/dictionary/fix-versions.d.ts +0 -9
- package/dist/dictionary/fix-versions.js +1 -39
- package/dist/dictionary/fix-versions.js.map +1 -1
- package/dist/dictionary/index.d.ts +1 -5
- package/dist/dictionary/index.js +1 -5
- package/dist/dictionary/index.js.map +1 -1
- package/dist/dictionary/parser/fix-repository/abbreviations-parser.d.ts +1 -3
- package/dist/dictionary/parser/fix-repository/abbreviations-parser.js +2 -3
- package/dist/dictionary/parser/fix-repository/abbreviations-parser.js.map +1 -1
- package/dist/dictionary/parser/fix-repository/base-parser.d.ts +2 -4
- package/dist/dictionary/parser/fix-repository/base-parser.js +1 -2
- package/dist/dictionary/parser/fix-repository/base-parser.js.map +1 -1
- package/dist/dictionary/parser/fix-repository/components-parser.d.ts +1 -3
- package/dist/dictionary/parser/fix-repository/components-parser.js +2 -3
- package/dist/dictionary/parser/fix-repository/components-parser.js.map +1 -1
- package/dist/dictionary/parser/fix-repository/data-types-parser.d.ts +1 -3
- package/dist/dictionary/parser/fix-repository/data-types-parser.js +2 -3
- package/dist/dictionary/parser/fix-repository/data-types-parser.js.map +1 -1
- package/dist/dictionary/parser/fix-repository/enums-parser.d.ts +1 -3
- package/dist/dictionary/parser/fix-repository/enums-parser.js +2 -3
- package/dist/dictionary/parser/fix-repository/enums-parser.js.map +1 -1
- package/dist/dictionary/parser/fix-repository/fields-parser.d.ts +1 -3
- package/dist/dictionary/parser/fix-repository/fields-parser.js +2 -3
- package/dist/dictionary/parser/fix-repository/fields-parser.js.map +1 -1
- package/dist/dictionary/parser/fix-repository/messages-parser.d.ts +1 -3
- package/dist/dictionary/parser/fix-repository/messages-parser.js +2 -3
- package/dist/dictionary/parser/fix-repository/messages-parser.js.map +1 -1
- package/dist/dictionary/parser/fix-repository/msg-contents-parser.d.ts +1 -3
- package/dist/dictionary/parser/fix-repository/msg-contents-parser.js +2 -3
- package/dist/dictionary/parser/fix-repository/msg-contents-parser.js.map +1 -1
- package/dist/dictionary/parser/fix-repository/repository-abbreviation.d.ts +5 -0
- package/dist/dictionary/parser/fix-repository/repository-abbreviation.js +3 -0
- package/dist/dictionary/parser/fix-repository/repository-abbreviation.js.map +1 -0
- package/dist/dictionary/parser/fix-repository/repository-component.d.ts +10 -0
- package/dist/dictionary/parser/fix-repository/repository-component.js +3 -0
- package/dist/dictionary/parser/fix-repository/repository-component.js.map +1 -0
- package/dist/dictionary/parser/fix-repository/repository-data-type.d.ts +6 -0
- package/dist/dictionary/parser/fix-repository/repository-data-type.js +3 -0
- package/dist/dictionary/parser/fix-repository/repository-data-type.js.map +1 -0
- package/dist/dictionary/parser/fix-repository/repository-enum.d.ts +7 -0
- package/dist/dictionary/parser/fix-repository/repository-enum.js +3 -0
- package/dist/dictionary/parser/fix-repository/repository-enum.js.map +1 -0
- package/dist/dictionary/parser/fix-repository/repository-field.d.ts +11 -0
- package/dist/dictionary/parser/fix-repository/repository-field.js +3 -0
- package/dist/dictionary/parser/fix-repository/repository-field.js.map +1 -0
- package/dist/dictionary/parser/fix-repository/repository-message.d.ts +11 -0
- package/dist/dictionary/parser/fix-repository/repository-message.js +3 -0
- package/dist/dictionary/parser/fix-repository/repository-message.js.map +1 -0
- package/dist/dictionary/parser/fix-repository/repository-msg-content.d.ts +9 -0
- package/dist/dictionary/parser/fix-repository/repository-msg-content.js +3 -0
- package/dist/dictionary/parser/fix-repository/repository-msg-content.js.map +1 -0
- package/dist/dictionary/parser/fix-repository/repository-msg.d.ts +0 -0
- package/dist/dictionary/parser/fix-repository/repository-msg.js +1 -0
- package/dist/dictionary/parser/fix-repository/repository-msg.js.map +1 -0
- package/dist/dictionary/parser/fix-repository/repository-type.d.ts +0 -53
- package/dist/dictionary/parser/fix-repository/repository-type.js +0 -2
- package/dist/dictionary/parser/fix-repository/repository-type.js.map +1 -1
- package/dist/dictionary/parser/fix-repository/repository-xml-parser.js +10 -10
- package/dist/dictionary/parser/fix-repository/repository-xml-parser.js.map +1 -1
- package/dist/dictionary/parser/fix-repository/repository.d.ts +12 -1
- package/dist/dictionary/parser/fix-repository/repository.js +50 -28
- package/dist/dictionary/parser/fix-repository/repository.js.map +1 -1
- package/dist/dictionary/parser/fixml/components-parser.d.ts +1 -1
- package/dist/dictionary/parser/fixml/components-parser.js.map +1 -1
- package/dist/dictionary/parser/fixml/fields-parser.d.ts +1 -1
- package/dist/dictionary/parser/fixml/fields-parser.js.map +1 -1
- package/dist/dictionary/parser/fixml/fix-xsd-parser.js +3 -2
- package/dist/dictionary/parser/fixml/fix-xsd-parser.js.map +1 -1
- package/dist/dictionary/parser/fixml/include-graph.js.map +1 -1
- package/dist/dictionary/parser/fixml/xsd-parser.d.ts +1 -1
- package/dist/dictionary/parser/fixml/xsd-parser.js.map +1 -1
- package/dist/dictionary/parser/quickfix/field-definition-parser.d.ts +4 -4
- package/dist/dictionary/parser/quickfix/field-definition-parser.js +3 -3
- package/dist/dictionary/parser/quickfix/field-definition-parser.js.map +1 -1
- package/dist/dictionary/parser/quickfix/field-set-parser.d.ts +4 -4
- package/dist/dictionary/parser/quickfix/field-set-parser.js +3 -3
- package/dist/dictionary/parser/quickfix/field-set-parser.js.map +1 -1
- package/dist/dictionary/parser/quickfix/message-parser.d.ts +4 -4
- package/dist/dictionary/parser/quickfix/message-parser.js +3 -3
- package/dist/dictionary/parser/quickfix/message-parser.js.map +1 -1
- package/dist/dictionary/parser/quickfix/node-parser.d.ts +4 -5
- package/dist/dictionary/parser/quickfix/node-parser.js +4 -4
- package/dist/dictionary/parser/quickfix/node-parser.js.map +1 -1
- package/dist/dictionary/parser/quickfix/parse-state.d.ts +8 -0
- package/dist/dictionary/parser/quickfix/parse-state.js +13 -0
- package/dist/dictionary/parser/quickfix/parse-state.js.map +1 -0
- package/dist/dictionary/parser/quickfix/quick-fix-xml-file-parser.d.ts +1 -9
- package/dist/dictionary/parser/quickfix/quick-fix-xml-file-parser.js +28 -35
- package/dist/dictionary/parser/quickfix/quick-fix-xml-file-parser.js.map +1 -1
- package/dist/dictionary/sax-node.d.ts +6 -0
- package/dist/{types/FIX4.4/quickfix/set/header.js → dictionary/sax-node.js} +1 -1
- package/dist/dictionary/sax-node.js.map +1 -0
- package/dist/dictionary/set-reduce.d.ts +5 -12
- package/dist/dictionary/set-reduce.js +28 -26
- package/dist/dictionary/set-reduce.js.map +1 -1
- package/dist/dictionary/type-dispatcher.d.ts +12 -0
- package/dist/dictionary/type-dispatcher.js +3 -0
- package/dist/dictionary/type-dispatcher.js.map +1 -0
- package/dist/dictionary/version-util.d.ts +4 -0
- package/dist/dictionary/version-util.js +36 -0
- package/dist/dictionary/version-util.js.map +1 -0
- package/dist/execution-report.test.d.ts +0 -0
- package/dist/execution-report.test.js +1 -0
- package/dist/execution-report.test.js.map +1 -0
- package/dist/experiment.d.ts +0 -0
- package/dist/experiment.js +1 -0
- package/dist/experiment.js.map +1 -0
- package/dist/fix-repo-dict.test.d.ts +0 -0
- package/dist/fix-repo-dict.test.js +1 -0
- package/dist/fix-repo-dict.test.js.map +1 -0
- package/dist/fix-session-state-args.d.ts +0 -0
- package/dist/fix-session-state-args.js +1 -0
- package/dist/fix-session-state-args.js.map +1 -0
- package/dist/fix-session-state.d.ts +0 -0
- package/dist/fix-session-state.js +1 -0
- package/dist/fix-session-state.js.map +1 -0
- package/dist/fix-session.d.ts +0 -0
- package/dist/fix-session.js +1 -0
- package/dist/fix-session.js.map +1 -0
- package/dist/fix.txt +1 -0
- package/dist/fixml-alloc-parse.test.d.ts +0 -0
- package/dist/fixml-alloc-parse.test.js +1 -0
- package/dist/fixml-alloc-parse.test.js.map +1 -0
- package/dist/fixml-mkt-data-fut-parse.test.d.ts +0 -0
- package/dist/fixml-mkt-data-fut-parse.test.js +1 -0
- package/dist/fixml-mkt-data-fut-parse.test.js.map +1 -0
- package/dist/fixml-mkt-data-settle-parse.test.d.ts +0 -0
- package/dist/fixml-mkt-data-settle-parse.test.js +1 -0
- package/dist/fixml-mkt-data-settle-parse.test.js.map +1 -0
- package/dist/fixml-tc-bi-lateral-parse.test.d.ts +0 -0
- package/dist/fixml-tc-bi-lateral-parse.test.js +1 -0
- package/dist/fixml-tc-bi-lateral-parse.test.js.map +1 -0
- package/dist/includes.test.d.ts +0 -0
- package/dist/includes.test.js +1 -0
- package/dist/includes.test.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/jsfix-cmd.d.ts +5 -0
- package/dist/jsfix-cmd.js +28 -21
- package/dist/jsfix-cmd.js.map +1 -1
- package/dist/launcher.d.ts +0 -0
- package/dist/launcher.js +1 -0
- package/dist/launcher.js.map +1 -0
- package/dist/logon.test.d.ts +0 -0
- package/dist/logon.test.js +1 -0
- package/dist/logon.test.js.map +1 -0
- package/dist/make-fix-session.d.ts +0 -0
- package/dist/make-fix-session.js +1 -0
- package/dist/make-fix-session.js.map +1 -0
- package/dist/memory-store.test.d.ts +0 -0
- package/dist/memory-store.test.js +1 -0
- package/dist/memory-store.test.js.map +1 -0
- package/dist/object.json +691 -0
- package/dist/qf-full-msg.test.d.ts +0 -0
- package/dist/qf-full-msg.test.js +1 -0
- package/dist/qf-full-msg.test.js.map +1 -0
- package/dist/repo-full-ascii-msg.test.d.ts +0 -0
- package/dist/repo-full-ascii-msg.test.js +1 -0
- package/dist/repo-full-ascii-msg.test.js.map +1 -0
- package/dist/runtime/DITokens.d.ts +20 -0
- package/dist/runtime/DITokens.js +25 -0
- package/dist/runtime/DITokens.js.map +1 -0
- package/dist/runtime/app-launcher.d.ts +27 -0
- package/dist/runtime/app-launcher.js +131 -0
- package/dist/runtime/app-launcher.js.map +1 -0
- package/dist/runtime/di-tokens.d.ts +28 -0
- package/dist/runtime/di-tokens.js +33 -0
- package/dist/runtime/di-tokens.js.map +1 -0
- package/dist/runtime/engine-factory.d.ts +4 -0
- package/dist/runtime/engine-factory.js +3 -0
- package/dist/runtime/engine-factory.js.map +1 -0
- package/dist/runtime/index.d.ts +5 -0
- package/dist/runtime/index.js +18 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/launcher.d.ts +29 -0
- package/dist/runtime/launcher.js +131 -0
- package/dist/runtime/launcher.js.map +1 -0
- package/dist/runtime/make-config.d.ts +11 -0
- package/dist/runtime/make-config.js +57 -0
- package/dist/runtime/make-config.js.map +1 -0
- package/dist/runtime/session-container.d.ts +16 -0
- package/dist/runtime/session-container.js +168 -0
- package/dist/runtime/session-container.js.map +1 -0
- package/dist/runtime/session-launcher.d.ts +26 -0
- package/dist/runtime/session-launcher.js +131 -0
- package/dist/runtime/session-launcher.js.map +1 -0
- package/dist/sample/http/oms/app.d.ts +1 -1
- package/dist/sample/http/oms/app.js +16 -14
- package/dist/sample/http/oms/app.js.map +1 -1
- package/dist/sample/http/oms/http-client.js +22 -2
- package/dist/sample/http/oms/http-client.js.map +1 -1
- package/dist/sample/http/oms/http-server.js +21 -2
- package/dist/sample/http/oms/http-server.js.map +1 -1
- package/dist/sample/launcher.d.ts +21 -4
- package/dist/sample/launcher.js +87 -19
- package/dist/sample/launcher.js.map +1 -1
- package/dist/sample/tcp/qf-md/app.d.ts +1 -1
- package/dist/sample/tcp/qf-md/app.js +11 -11
- package/dist/sample/tcp/qf-md/app.js.map +1 -1
- package/dist/sample/tcp/qf-md/md-client.js +21 -2
- package/dist/sample/tcp/qf-md/md-client.js.map +1 -1
- package/dist/sample/tcp/qf-md/md-server.js +20 -2
- package/dist/sample/tcp/qf-md/md-server.js.map +1 -1
- package/dist/sample/tcp/recovering-skeleton/app.d.ts +1 -1
- package/dist/sample/tcp/recovering-skeleton/app.js +36 -16
- package/dist/sample/tcp/recovering-skeleton/app.js.map +1 -1
- package/dist/sample/tcp/recovering-skeleton/respawn-acceptor.d.ts +3 -1
- package/dist/sample/tcp/recovering-skeleton/respawn-acceptor.js +30 -8
- package/dist/sample/tcp/recovering-skeleton/respawn-acceptor.js.map +1 -1
- package/dist/sample/tcp/recovering-skeleton/skeleton-client.d.ts +1 -1
- package/dist/sample/tcp/recovering-skeleton/skeleton-client.js +22 -3
- package/dist/sample/tcp/recovering-skeleton/skeleton-client.js.map +1 -1
- package/dist/sample/tcp/recovering-skeleton/skeleton-server.js +21 -2
- package/dist/sample/tcp/recovering-skeleton/skeleton-server.js.map +1 -1
- package/dist/sample/tcp/skeleton/app.d.ts +1 -1
- package/dist/sample/tcp/skeleton/app.js +8 -13
- package/dist/sample/tcp/skeleton/app.js.map +1 -1
- package/dist/sample/tcp/skeleton/skeleton-session.d.ts +1 -1
- package/dist/sample/tcp/skeleton/skeleton-session.js +26 -4
- package/dist/sample/tcp/skeleton/skeleton-session.js.map +1 -1
- package/dist/sample/tcp/tls-trade-capture/app.d.ts +1 -1
- package/dist/sample/tcp/tls-trade-capture/app.js +4 -24
- package/dist/sample/tcp/tls-trade-capture/app.js.map +1 -1
- package/dist/sample/tcp/trade-capture/app-launcher.d.ts +6 -0
- package/dist/sample/tcp/trade-capture/app-launcher.js +21 -0
- package/dist/sample/tcp/trade-capture/app-launcher.js.map +1 -0
- package/dist/sample/tcp/trade-capture/app-launher.d.ts +0 -0
- package/dist/sample/tcp/trade-capture/app-launher.js +1 -0
- package/dist/sample/tcp/trade-capture/app-launher.js.map +1 -0
- package/dist/sample/tcp/trade-capture/app.d.ts +1 -1
- package/dist/sample/tcp/trade-capture/app.js +4 -21
- package/dist/sample/tcp/trade-capture/app.js.map +1 -1
- package/dist/sample/tcp/trade-capture/jsfix.test_client.txt +11 -0
- package/dist/sample/tcp/trade-capture/jsfix.test_server.txt +10 -0
- package/dist/sample/tcp/trade-capture/trade-capture-client.js.map +1 -1
- package/dist/sample/tcp/trade-capture/trade-capture-server.js.map +1 -1
- package/dist/sample/tcp/trade-capture/trade-factory.js +7 -1
- package/dist/sample/tcp/trade-capture/trade-factory.js.map +1 -1
- package/dist/segment-description.d.ts +0 -0
- package/dist/segment-description.js +1 -0
- package/dist/segment-description.js.map +1 -0
- package/dist/segment-summary.d.ts +0 -0
- package/dist/segment-summary.js +1 -0
- package/dist/segment-summary.js.map +1 -0
- package/dist/segment-type.d.ts +0 -0
- package/dist/segment-type.js +1 -0
- package/dist/segment-type.js.map +1 -0
- package/dist/session-description.d.ts +0 -0
- package/dist/session-description.js +1 -0
- package/dist/session-description.js.map +1 -0
- package/dist/session-msg-factory.d.ts +0 -0
- package/dist/session-msg-factory.js +1 -0
- package/dist/session-msg-factory.js.map +1 -0
- package/dist/session-state.d.ts +0 -0
- package/dist/session-state.js +1 -0
- package/dist/session-state.js.map +1 -0
- package/dist/session-state.test.d.ts +0 -0
- package/dist/session-state.test.js +1 -0
- package/dist/session-state.test.js.map +1 -0
- package/dist/session.test.d.ts +0 -0
- package/dist/session.test.js +1 -0
- package/dist/session.test.js.map +1 -0
- package/dist/setup.d.ts +0 -0
- package/dist/setup.js +1 -0
- package/dist/setup.js.map +1 -0
- package/dist/skeleton-runner.d.ts +0 -0
- package/dist/skeleton-runner.js +1 -0
- package/dist/skeleton-runner.js.map +1 -0
- package/dist/store/fix-msg-ascii-store-resend.d.ts +1 -1
- package/dist/store/fix-msg-ascii-store-resend.js +2 -1
- package/dist/store/fix-msg-ascii-store-resend.js.map +1 -1
- package/dist/store/fix-msg-memory-store.d.ts +1 -1
- package/dist/store/fix-msg-memory-store.js.map +1 -1
- package/dist/store/fix-msg-store-record.d.ts +2 -0
- package/dist/store/fix-msg-store-record.js +4 -0
- package/dist/store/fix-msg-store-record.js.map +1 -1
- package/dist/store/fix-msg-store-state.d.ts +6 -0
- package/dist/store/fix-msg-store-state.js +3 -0
- package/dist/store/fix-msg-store-state.js.map +1 -0
- package/dist/store/fix-msg-store.d.ts +1 -6
- package/dist/store/fix-msg-store.js.map +1 -1
- package/dist/structure.json +631 -0
- package/dist/tag-pos.d.ts +0 -0
- package/dist/tag-pos.js +1 -0
- package/dist/tag-pos.js.map +1 -0
- package/dist/tag-type.d.ts +0 -0
- package/dist/tag-type.js +1 -0
- package/dist/tag-type.js.map +1 -0
- package/dist/tags.d.ts +0 -0
- package/dist/tags.js +1 -0
- package/dist/tags.js.map +1 -0
- package/dist/test/ascii/ascii-encoder.test.d.ts +1 -0
- package/dist/test/{ascii-encode.test.js → ascii/ascii-encoder.test.js} +140 -49
- package/dist/test/ascii/ascii-encoder.test.js.map +1 -0
- package/dist/test/ascii/ascii-parser.test.d.ts +1 -0
- package/dist/test/ascii/ascii-parser.test.js +123 -0
- package/dist/test/ascii/ascii-parser.test.js.map +1 -0
- package/dist/test/ascii/ascii-segment.test.d.ts +1 -0
- package/dist/test/ascii/ascii-segment.test.js +86 -0
- package/dist/test/ascii/ascii-segment.test.js.map +1 -0
- package/dist/test/ascii/ascii-store-replay.test.d.ts +1 -0
- package/dist/test/ascii/ascii-store-replay.test.js +92 -0
- package/dist/test/ascii/ascii-store-replay.test.js.map +1 -0
- package/dist/test/ascii/ascii-tag-pos.test.d.ts +1 -0
- package/dist/test/ascii/ascii-tag-pos.test.js +105 -0
- package/dist/test/ascii/ascii-tag-pos.test.js.map +1 -0
- package/dist/test/ascii/execution-report.test.d.ts +1 -0
- package/dist/test/ascii/execution-report.test.js +489 -0
- package/dist/test/ascii/execution-report.test.js.map +1 -0
- package/dist/test/ascii/fix-log-replay.test.d.ts +1 -0
- package/dist/test/ascii/fix-log-replay.test.js +47 -0
- package/dist/test/ascii/fix-log-replay.test.js.map +1 -0
- package/dist/test/ascii/fix-repo-dict.test.d.ts +1 -0
- package/dist/test/ascii/fix-repo-dict.test.js +128 -0
- package/dist/test/ascii/fix-repo-dict.test.js.map +1 -0
- package/dist/test/ascii/includes.test.d.ts +1 -0
- package/dist/test/ascii/includes.test.js +43 -0
- package/dist/test/ascii/includes.test.js.map +1 -0
- package/dist/test/ascii/logon.test.d.ts +1 -0
- package/dist/test/ascii/logon.test.js +91 -0
- package/dist/test/ascii/logon.test.js.map +1 -0
- package/dist/test/ascii/memory-store.test.d.ts +1 -0
- package/dist/test/ascii/memory-store.test.js +75 -0
- package/dist/test/ascii/memory-store.test.js.map +1 -0
- package/dist/test/ascii/qf-full-msg.test.d.ts +1 -0
- package/dist/test/ascii/qf-full-msg.test.js +81 -0
- package/dist/test/ascii/qf-full-msg.test.js.map +1 -0
- package/dist/test/ascii/repo-full-ascii-msg.test.d.ts +1 -0
- package/dist/test/ascii/repo-full-ascii-msg.test.js +87 -0
- package/dist/test/ascii/repo-full-ascii-msg.test.js.map +1 -0
- package/dist/test/ascii/session-state.test.d.ts +1 -0
- package/dist/test/ascii/session-state.test.js +73 -0
- package/dist/test/ascii/session-state.test.js.map +1 -0
- package/dist/test/ascii/session.test.d.ts +1 -0
- package/dist/test/ascii/session.test.js +280 -0
- package/dist/test/ascii/session.test.js.map +1 -0
- package/dist/test/ascii/time-formatter.test.d.ts +1 -0
- package/dist/test/ascii/time-formatter.test.js +80 -0
- package/dist/test/ascii/time-formatter.test.js.map +1 -0
- package/dist/test/ascii/view-decode.test.d.ts +1 -0
- package/dist/test/ascii/view-decode.test.js +183 -0
- package/dist/test/ascii/view-decode.test.js.map +1 -0
- package/dist/test/ascii-encoder.test.d.ts +1 -1
- package/dist/test/ascii-encoder.test.js +51 -48
- package/dist/test/ascii-encoder.test.js.map +1 -1
- package/dist/test/ascii-parser.test.d.ts +1 -1
- package/dist/test/ascii-parser.test.js +26 -45
- package/dist/test/ascii-parser.test.js.map +1 -1
- package/dist/test/ascii-segment.test.d.ts +1 -1
- package/dist/test/ascii-segment.test.js +13 -34
- package/dist/test/ascii-segment.test.js.map +1 -1
- package/dist/test/ascii-store-replay.test.d.ts +1 -1
- package/dist/test/ascii-store-replay.test.js +12 -41
- package/dist/test/ascii-store-replay.test.js.map +1 -1
- package/dist/test/ascii-tag-pos.test.d.ts +1 -1
- package/dist/test/ascii-tag-pos.test.js +8 -8
- package/dist/test/ascii-tag-pos.test.js.map +1 -1
- package/dist/test/elastic-buffer.test.d.ts +1 -1
- package/dist/test/elastic-buffer.test.js +3 -1
- package/dist/test/elastic-buffer.test.js.map +1 -1
- package/dist/test/encode-proxy.test.d.ts +1 -1
- package/dist/test/encode-proxy.test.js +9 -9
- package/dist/test/encode-proxy.test.js.map +1 -1
- package/dist/test/env/experiment.d.ts +23 -0
- package/dist/test/env/experiment.js +33 -0
- package/dist/test/env/experiment.js.map +1 -0
- package/dist/test/env/parsing-result.d.ts +10 -0
- package/dist/test/env/parsing-result.js +14 -0
- package/dist/test/env/parsing-result.js.map +1 -0
- package/dist/test/env/setup.d.ts +39 -0
- package/dist/test/env/setup.js +98 -0
- package/dist/test/env/setup.js.map +1 -0
- package/dist/test/env/skeleton-runner.d.ts +15 -0
- package/dist/test/env/skeleton-runner.js +108 -0
- package/dist/test/env/skeleton-runner.js.map +1 -0
- package/dist/test/env/test-recovery.d.ts +13 -0
- package/dist/test/env/test-recovery.js +41 -0
- package/dist/test/env/test-recovery.js.map +1 -0
- package/dist/test/env/to-views.d.ts +11 -0
- package/dist/test/env/to-views.js +56 -0
- package/dist/test/env/to-views.js.map +1 -0
- package/dist/test/execution-report.test.d.ts +1 -1
- package/dist/test/execution-report.test.js +53 -49
- package/dist/test/execution-report.test.js.map +1 -1
- package/dist/test/experiment.d.ts +23 -0
- package/dist/test/experiment.js +33 -0
- package/dist/test/experiment.js.map +1 -0
- package/dist/test/expieriment.d.ts +23 -0
- package/dist/test/expieriment.js +33 -0
- package/dist/test/expieriment.js.map +1 -0
- package/dist/test/fix-log-replay.test.d.ts +1 -1
- package/dist/test/fix-log-replay.test.js +7 -5
- package/dist/test/fix-log-replay.test.js.map +1 -1
- package/dist/test/fix-repo-dict.test.d.ts +1 -1
- package/dist/test/fix-repo-dict.test.js +6 -5
- package/dist/test/fix-repo-dict.test.js.map +1 -1
- package/dist/test/fixml/fixml-alloc-parse.test.d.ts +1 -0
- package/dist/test/fixml/fixml-alloc-parse.test.js +161 -0
- package/dist/test/fixml/fixml-alloc-parse.test.js.map +1 -0
- package/dist/test/fixml/fixml-mkt-data-fut-parse.test.d.ts +1 -0
- package/dist/test/fixml/fixml-mkt-data-fut-parse.test.js +61 -0
- package/dist/test/fixml/fixml-mkt-data-fut-parse.test.js.map +1 -0
- package/dist/test/fixml/fixml-mkt-data-settle-parse.test.d.ts +1 -0
- package/dist/test/fixml/fixml-mkt-data-settle-parse.test.js +34 -0
- package/dist/test/fixml/fixml-mkt-data-settle-parse.test.js.map +1 -0
- package/dist/test/fixml/fixml-tc-bi-lateral-parse.test.d.ts +1 -0
- package/dist/test/fixml/fixml-tc-bi-lateral-parse.test.js +97 -0
- package/dist/test/fixml/fixml-tc-bi-lateral-parse.test.js.map +1 -0
- package/dist/test/fixml/repo-full-fixml-msg.test.d.ts +1 -0
- package/dist/test/fixml/repo-full-fixml-msg.test.js +143 -0
- package/dist/test/fixml/repo-full-fixml-msg.test.js.map +1 -0
- package/dist/test/fixml-alloc-parse.test.d.ts +1 -1
- package/dist/test/fixml-alloc-parse.test.js +2 -1
- package/dist/test/fixml-alloc-parse.test.js.map +1 -1
- package/dist/test/fixml-mkt-data-fut-parse.test.d.ts +1 -1
- package/dist/test/fixml-mkt-data-fut-parse.test.js +2 -1
- package/dist/test/fixml-mkt-data-fut-parse.test.js.map +1 -1
- package/dist/test/fixml-mkt-data-settle-parse.test.d.ts +1 -1
- package/dist/test/fixml-mkt-data-settle-parse.test.js +2 -1
- package/dist/test/fixml-mkt-data-settle-parse.test.js.map +1 -1
- package/dist/test/fixml-tc-bi-lateral-parse.test.d.ts +1 -1
- package/dist/test/fixml-tc-bi-lateral-parse.test.js +2 -1
- package/dist/test/fixml-tc-bi-lateral-parse.test.js.map +1 -1
- package/dist/test/includes.test.d.ts +1 -1
- package/dist/test/includes.test.js +1 -0
- package/dist/test/includes.test.js.map +1 -1
- package/dist/test/logon.test.d.ts +1 -1
- package/dist/test/logon.test.js +11 -11
- package/dist/test/logon.test.js.map +1 -1
- package/dist/test/memory-store.test.d.ts +1 -1
- package/dist/test/memory-store.test.js +11 -8
- package/dist/test/memory-store.test.js.map +1 -1
- package/dist/test/qf-full-msg.test.d.ts +1 -1
- package/dist/test/qf-full-msg.test.js +13 -9
- package/dist/test/qf-full-msg.test.js.map +1 -1
- package/dist/test/repo-full-ascii-msg.test.d.ts +1 -1
- package/dist/test/repo-full-ascii-msg.test.js +14 -10
- package/dist/test/repo-full-ascii-msg.test.js.map +1 -1
- package/dist/test/repo-full-fixml-msg.test.d.ts +1 -1
- package/dist/test/repo-full-fixml-msg.test.js +7 -4
- package/dist/test/repo-full-fixml-msg.test.js.map +1 -1
- package/dist/test/session-state.test.d.ts +1 -1
- package/dist/test/session-state.test.js +1 -0
- package/dist/test/session-state.test.js.map +1 -1
- package/dist/test/session.test.d.ts +1 -1
- package/dist/test/session.test.js +13 -144
- package/dist/test/session.test.js.map +1 -1
- package/dist/test/setup.d.ts +45 -0
- package/dist/test/setup.js +102 -0
- package/dist/test/setup.js.map +1 -0
- package/dist/test/skeleton-runner.d.ts +15 -0
- package/dist/test/skeleton-runner.js +108 -0
- package/dist/test/skeleton-runner.js.map +1 -0
- package/dist/test/time-formatter.test.d.ts +1 -1
- package/dist/test/time-formatter.test.js +3 -1
- package/dist/test/time-formatter.test.js.map +1 -1
- package/dist/test/to-views.d.ts +1 -1
- package/dist/test/to-views.js +5 -4
- package/dist/test/to-views.js.map +1 -1
- package/dist/test/view-decode.test.d.ts +1 -1
- package/dist/test/view-decode.test.js +9 -34
- package/dist/test/view-decode.test.js.map +1 -1
- package/dist/time-formatter.test.d.ts +0 -0
- package/dist/time-formatter.test.js +1 -0
- package/dist/time-formatter.test.js.map +1 -0
- package/dist/to-views.d.ts +0 -0
- package/dist/to-views.js +1 -0
- package/dist/to-views.js.map +1 -0
- package/dist/token.txt +248 -0
- package/dist/transport/FixEntity.d.ts +8 -0
- package/dist/transport/FixEntity.js +12 -0
- package/dist/transport/FixEntity.js.map +1 -0
- package/dist/transport/a-session-msg-factory.d.ts +2 -2
- package/dist/transport/a-session-msg-factory.js.map +1 -1
- package/dist/transport/ascii/ascii-msg-transmitter.js +25 -6
- package/dist/transport/ascii/ascii-msg-transmitter.js.map +1 -1
- package/dist/transport/ascii/ascii-session-msg-factory.d.ts +2 -2
- package/dist/transport/ascii/ascii-session-msg-factory.js +1 -1
- package/dist/transport/ascii/ascii-session-msg-factory.js.map +1 -1
- package/dist/transport/ascii/ascii-session.d.ts +1 -1
- package/dist/transport/ascii/ascii-session.js +26 -23
- package/dist/transport/ascii/ascii-session.js.map +1 -1
- package/dist/transport/ascii/index.d.ts +0 -1
- package/dist/transport/ascii/index.js +0 -1
- package/dist/transport/ascii/index.js.map +1 -1
- package/dist/transport/duplex/http-duplex.d.ts +1 -1
- package/dist/transport/duplex/http-duplex.js.map +1 -1
- package/dist/transport/duplex/tcp-duplex.js +22 -2
- package/dist/transport/duplex/tcp-duplex.js.map +1 -1
- package/dist/transport/factory/index.d.ts +1 -0
- package/dist/transport/factory/index.js +14 -0
- package/dist/transport/factory/index.js.map +1 -0
- package/dist/transport/{msg-transport.d.ts → factory/msg-transport.d.ts} +4 -4
- package/dist/transport/factory/msg-transport.js +61 -0
- package/dist/transport/factory/msg-transport.js.map +1 -0
- package/dist/transport/fix-acceptor.d.ts +2 -2
- package/dist/transport/fix-acceptor.js.map +1 -1
- package/dist/transport/fix-entity.d.ts +8 -0
- package/dist/transport/fix-entity.js +12 -0
- package/dist/transport/fix-entity.js.map +1 -0
- package/dist/transport/fix-initiator.d.ts +2 -2
- package/dist/transport/fix-initiator.js.map +1 -1
- package/dist/transport/fix-msg-factory.d.ts +1 -1
- package/dist/transport/fix-msg-factory.js.map +1 -1
- package/dist/transport/fix-session-state-args.d.ts +8 -0
- package/dist/transport/fix-session-state-args.js +3 -0
- package/dist/transport/fix-session-state-args.js.map +1 -0
- package/dist/transport/fix-session-state.d.ts +3 -41
- package/dist/transport/fix-session-state.js +21 -54
- package/dist/transport/fix-session-state.js.map +1 -1
- package/dist/transport/fix-session.d.ts +3 -2
- package/dist/transport/fix-session.js +44 -42
- package/dist/transport/fix-session.js.map +1 -1
- package/dist/transport/fixml/fixml-msg-transmitter.js +23 -5
- package/dist/transport/fixml/fixml-msg-transmitter.js.map +1 -1
- package/dist/transport/fixml/fixml-session-msg-factory.d.ts +2 -2
- package/dist/transport/fixml/fixml-session-msg-factory.js +1 -1
- package/dist/transport/fixml/fixml-session-msg-factory.js.map +1 -1
- package/dist/transport/fixml/fixml-session.d.ts +1 -1
- package/dist/transport/fixml/fixml-session.js +3 -3
- package/dist/transport/fixml/fixml-session.js.map +1 -1
- package/dist/transport/fixml/index.d.ts +0 -2
- package/dist/transport/fixml/index.js +0 -2
- package/dist/transport/fixml/index.js.map +1 -1
- package/dist/transport/http/html-options.d.ts +8 -0
- package/dist/{store/replay-record.js → transport/http/html-options.js} +1 -1
- package/dist/transport/http/html-options.js.map +1 -0
- package/dist/transport/http/html-route.d.ts +5 -0
- package/dist/{types/FIX4.4/quickfix/set/trailer.js → transport/http/html-route.js} +1 -1
- package/dist/transport/http/html-route.js.map +1 -0
- package/dist/transport/http/http-acceptor-listener.d.ts +7 -0
- package/dist/transport/http/http-acceptor-listener.js +68 -0
- package/dist/transport/http/http-acceptor-listener.js.map +1 -0
- package/dist/transport/http/http-acceptor.js +24 -5
- package/dist/transport/http/http-acceptor.js.map +1 -1
- package/dist/transport/http/http-adapter.d.ts +7 -0
- package/dist/transport/http/http-adapter.js +3 -0
- package/dist/transport/http/http-adapter.js.map +1 -0
- package/dist/transport/http/http-initiator.d.ts +9 -3
- package/dist/transport/http/http-initiator.js +57 -26
- package/dist/transport/http/http-initiator.js.map +1 -1
- package/dist/transport/http/http-json-sample-adapter.d.ts +2 -1
- package/dist/transport/http/http-json-sample-adapter.js +21 -2
- package/dist/transport/http/http-json-sample-adapter.js.map +1 -1
- package/dist/transport/http/http-transaction.d.ts +1 -1
- package/dist/transport/http/http-transaction.js.map +1 -1
- package/dist/transport/http/http-transport-description.d.ts +8 -0
- package/dist/transport/http/http-transport-description.js +3 -0
- package/dist/transport/http/http-transport-description.js.map +1 -0
- package/dist/transport/http/index.d.ts +1 -0
- package/dist/transport/http/index.js +1 -0
- package/dist/transport/http/index.js.map +1 -1
- package/dist/transport/index.d.ts +11 -10
- package/dist/transport/index.js +11 -10
- package/dist/transport/index.js.map +1 -1
- package/dist/transport/{make-fixl-session.d.ts → make-fix-session.d.ts} +0 -0
- package/dist/transport/make-fix-session.js +3 -0
- package/dist/transport/make-fix-session.js.map +1 -0
- package/dist/transport/msg-application.d.ts +12 -0
- package/dist/transport/msg-application.js +3 -0
- package/dist/transport/msg-application.js.map +1 -0
- package/dist/transport/msg-transmitter.d.ts +5 -5
- package/dist/transport/msg-transmitter.js +2 -3
- package/dist/transport/msg-transmitter.js.map +1 -1
- package/dist/transport/session/a-session-msg-factory.d.ts +23 -0
- package/dist/transport/session/a-session-msg-factory.js +58 -0
- package/dist/transport/session/a-session-msg-factory.js.map +1 -0
- package/dist/transport/session/fix-session-state-args.d.ts +8 -0
- package/dist/transport/session/fix-session-state-args.js +3 -0
- package/dist/transport/session/fix-session-state-args.js.map +1 -0
- package/dist/transport/session/fix-session-state.d.ts +32 -0
- package/dist/transport/session/fix-session-state.js +133 -0
- package/dist/transport/session/fix-session-state.js.map +1 -0
- package/dist/transport/session/fix-session.d.ts +50 -0
- package/dist/transport/session/fix-session.js +291 -0
- package/dist/transport/session/fix-session.js.map +1 -0
- package/dist/transport/session/make-fix-session.d.ts +5 -0
- package/dist/transport/session/make-fix-session.js +3 -0
- package/dist/transport/session/make-fix-session.js.map +1 -0
- package/dist/transport/session/session-description.d.ts +17 -0
- package/dist/transport/session/session-description.js +3 -0
- package/dist/transport/session/session-description.js.map +1 -0
- package/dist/transport/session/session-msg-factory.d.ts +15 -0
- package/dist/transport/session/session-msg-factory.js +3 -0
- package/dist/transport/session/session-msg-factory.js.map +1 -0
- package/dist/transport/session/session-state.d.ts +25 -0
- package/dist/transport/session/session-state.js +30 -0
- package/dist/transport/session/session-state.js.map +1 -0
- package/dist/transport/session-description.d.ts +1 -48
- package/dist/transport/session-description.js.map +1 -1
- package/dist/transport/session-msg-factory.d.ts +7 -20
- package/dist/transport/session-msg-factory.js +0 -150
- package/dist/transport/session-msg-factory.js.map +1 -1
- package/dist/transport/session-state.d.ts +25 -0
- package/dist/transport/session-state.js +30 -0
- package/dist/transport/session-state.js.map +1 -0
- package/dist/transport/tcp/index.d.ts +3 -2
- package/dist/transport/tcp/index.js +3 -2
- package/dist/transport/tcp/index.js.map +1 -1
- package/dist/transport/tcp/recovering-tcp-initiator.d.ts +7 -9
- package/dist/transport/tcp/recovering-tcp-initiator.js +41 -16
- package/dist/transport/tcp/recovering-tcp-initiator.js.map +1 -1
- package/dist/transport/tcp/tcp-acceptor-listener.d.ts +7 -0
- package/dist/transport/tcp/tcp-acceptor-listener.js +70 -0
- package/dist/transport/tcp/tcp-acceptor-listener.js.map +1 -0
- package/dist/transport/tcp/tcp-acceptor.js +29 -12
- package/dist/transport/tcp/tcp-acceptor.js.map +1 -1
- package/dist/transport/tcp/tcp-initiator-connector.d.ts +10 -0
- package/dist/transport/tcp/tcp-initiator-connector.js +97 -0
- package/dist/transport/tcp/tcp-initiator-connector.js.map +1 -0
- package/dist/transport/tcp/tcp-initiator.d.ts +2 -2
- package/dist/transport/tcp/tcp-initiator.js +28 -9
- package/dist/transport/tcp/tcp-initiator.js.map +1 -1
- package/dist/transport/tcp/tcp-transport-description.d.ts +6 -0
- package/dist/transport/tcp/tcp-transport-description.js +3 -0
- package/dist/transport/tcp/tcp-transport-description.js.map +1 -0
- package/dist/transport/tcp/tls-options-factory.d.ts +9 -0
- package/dist/transport/tcp/tls-options-factory.js +53 -0
- package/dist/transport/tcp/tls-options-factory.js.map +1 -0
- package/dist/transport/tcp/tls-options.d.ts +10 -5
- package/dist/transport/tcp/tls-options.js +0 -49
- package/dist/transport/tcp/tls-options.js.map +1 -1
- package/dist/transport/tick-action.d.ts +8 -0
- package/dist/transport/tick-action.js +13 -0
- package/dist/transport/tick-action.js.map +1 -0
- package/dist/util/buffer-helper.js +1 -1
- package/dist/util/buffer-helper.js.map +1 -1
- package/dist/util/definition-factory.d.ts +10 -0
- package/dist/util/definition-factory.js +56 -0
- package/dist/util/definition-factory.js.map +1 -0
- package/dist/util/dictionary-path.d.ts +4 -0
- package/dist/util/dictionary-path.js +3 -0
- package/dist/util/dictionary-path.js.map +1 -0
- package/dist/util/index.d.ts +1 -1
- package/dist/util/index.js +1 -1
- package/dist/util/index.js.map +1 -1
- package/dist/util/json-helper.d.ts +3 -1
- package/dist/util/json-helper.js +13 -12
- package/dist/util/json-helper.js.map +1 -1
- package/dist/util/message-generator.d.ts +1 -1
- package/dist/util/message-generator.js +16 -15
- package/dist/util/message-generator.js.map +1 -1
- package/dist/util/replay.d.ts +6 -3
- package/dist/util/replay.js +24 -26
- package/dist/util/replay.js.map +1 -1
- package/package.json +15 -10
- package/script/build.cmd +1 -0
- package/script/build.sh +1 -0
- package/script/test.cmd +3 -0
- package/src/buffer/{ascii-chars.ts → ascii/ascii-chars.ts} +0 -0
- package/src/buffer/ascii/ascii-encoder.ts +9 -6
- package/src/buffer/ascii/ascii-parser-state.ts +7 -12
- package/src/buffer/ascii/ascii-parser.ts +23 -16
- package/src/buffer/ascii/ascii-segment-parser.ts +14 -8
- package/src/buffer/ascii/ascii-view.ts +4 -9
- package/src/buffer/ascii/index.ts +1 -0
- package/src/buffer/ascii/parse-state.ts +8 -0
- package/src/buffer/ascii/time-formatter.ts +1 -1
- package/src/buffer/elastic-buffer.ts +7 -2
- package/src/buffer/encode-proxy.ts +9 -4
- package/src/buffer/fixml/fixml-encoder.ts +15 -11
- package/src/buffer/fixml/fixml-parser.ts +16 -6
- package/src/buffer/fixml/fixml-view.ts +4 -9
- package/src/buffer/fixml/populated-attributes.ts +6 -0
- package/src/buffer/index.ts +4 -8
- package/src/buffer/msg-encoder.ts +2 -1
- package/src/buffer/msg-view.ts +13 -9
- package/src/buffer/{segment-description.ts → segment/segment-description.ts} +4 -11
- package/src/buffer/{segment-summary.ts → segment/segment-summary.ts} +0 -0
- package/src/buffer/segment/segment-type.ts +8 -0
- package/src/buffer/structure.ts +3 -3
- package/src/buffer/{tag-pos.ts → tag/tag-pos.ts} +0 -0
- package/src/buffer/tag/tag-type.ts +13 -0
- package/src/buffer/{tags.ts → tag/tags.ts} +4 -16
- package/src/config/get-js-fx-logger.ts +4 -0
- package/src/config/index.ts +1 -0
- package/src/config/js-fix-config.ts +5 -2
- package/src/config/js-fix-logger.ts +0 -3
- package/src/dictionary/compiler/compiler-type.ts +3 -3
- package/src/dictionary/compiler/enum-compiler.ts +12 -1
- package/src/dictionary/compiler/msg-compiler.ts +8 -7
- package/src/dictionary/contained/contained-component-field.ts +2 -1
- package/src/dictionary/contained/contained-field-dispatch.ts +3 -7
- package/src/dictionary/contained/contained-field-dispatcher.ts +9 -0
- package/src/dictionary/contained/contained-field-set.ts +5 -3
- package/src/dictionary/contained/contained-field-type.ts +5 -0
- package/src/dictionary/contained/contained-field.ts +1 -6
- package/src/dictionary/contained/contained-group-field.ts +2 -1
- package/src/dictionary/contained/contained-simple-field.ts +2 -1
- package/src/dictionary/contained/field-dispatcher.ts +9 -0
- package/src/dictionary/contained/fields-dispatch.ts +46 -0
- package/src/dictionary/contained/index.ts +2 -0
- package/src/dictionary/contained-set-type.ts +5 -0
- package/src/dictionary/definition/component-field-definition.ts +1 -1
- package/src/dictionary/definition/fix-definitions.ts +2 -1
- package/src/dictionary/definition/group-field-definition.ts +1 -1
- package/src/dictionary/definition/index.ts +0 -1
- package/src/dictionary/definition/message-definition.ts +1 -1
- package/src/dictionary/definition/simple-field-definition.ts +3 -1
- package/src/dictionary/dict-primitive.ts +0 -13
- package/src/dictionary/fix-definition-source.ts +6 -0
- package/src/dictionary/fix-versions.ts +0 -32
- package/src/dictionary/index.ts +1 -5
- package/src/dictionary/parser/fix-repository/abbreviations-parser.ts +2 -3
- package/src/dictionary/parser/fix-repository/base-parser.ts +2 -3
- package/src/dictionary/parser/fix-repository/components-parser.ts +2 -3
- package/src/dictionary/parser/fix-repository/data-types-parser.ts +2 -3
- package/src/dictionary/parser/fix-repository/enums-parser.ts +2 -3
- package/src/dictionary/parser/fix-repository/fields-parser.ts +2 -3
- package/src/dictionary/parser/fix-repository/messages-parser.ts +2 -3
- package/src/dictionary/parser/fix-repository/msg-contents-parser.ts +2 -3
- package/src/dictionary/parser/fix-repository/repository-abbreviation.ts +6 -0
- package/src/dictionary/parser/fix-repository/repository-component.ts +11 -0
- package/src/dictionary/parser/fix-repository/repository-data-type.ts +7 -0
- package/src/dictionary/parser/fix-repository/repository-enum.ts +8 -0
- package/src/dictionary/parser/fix-repository/repository-field.ts +12 -0
- package/src/dictionary/parser/fix-repository/repository-message.ts +12 -0
- package/src/dictionary/parser/fix-repository/repository-msg-content.ts +10 -0
- package/src/dictionary/parser/fix-repository/repository-type.ts +0 -59
- package/src/dictionary/parser/fix-repository/repository-xml-parser.ts +10 -9
- package/src/dictionary/parser/fix-repository/repository.ts +69 -38
- package/src/dictionary/parser/fixml/components-parser.ts +6 -3
- package/src/dictionary/parser/fixml/fields-parser.ts +1 -1
- package/src/dictionary/parser/fixml/fix-xsd-parser.ts +2 -1
- package/src/dictionary/parser/fixml/include-graph.ts +2 -1
- package/src/dictionary/parser/fixml/xsd-parser.ts +2 -1
- package/src/dictionary/parser/quickfix/field-definition-parser.ts +4 -5
- package/src/dictionary/parser/quickfix/field-set-parser.ts +4 -5
- package/src/dictionary/parser/quickfix/message-parser.ts +4 -5
- package/src/dictionary/parser/quickfix/node-parser.ts +3 -6
- package/src/dictionary/parser/quickfix/parse-state.ts +8 -0
- package/src/dictionary/parser/quickfix/quick-fix-xml-file-parser.ts +9 -15
- package/src/dictionary/sax-node.ts +7 -0
- package/src/dictionary/set-reduce.ts +30 -31
- package/src/dictionary/type-dispatcher.ts +7 -0
- package/src/dictionary/version-util.ts +25 -0
- package/src/index.ts +1 -0
- package/src/jsfix-cmd.ts +31 -16
- package/src/runtime/di-tokens.ts +48 -0
- package/src/runtime/engine-factory.ts +5 -0
- package/src/runtime/index.ts +5 -0
- package/src/runtime/make-config.ts +35 -0
- package/src/runtime/session-container.ts +180 -0
- package/src/runtime/session-launcher.ts +127 -0
- package/src/sample/http/oms/app.ts +20 -14
- package/src/sample/http/oms/http-client.ts +5 -2
- package/src/sample/http/oms/http-server.ts +5 -1
- package/src/sample/tcp/qf-md/app.ts +12 -12
- package/src/sample/tcp/qf-md/md-client.ts +4 -1
- package/src/sample/tcp/qf-md/md-server.ts +3 -1
- package/src/sample/tcp/recovering-skeleton/app.ts +37 -15
- package/src/sample/tcp/recovering-skeleton/respawn-acceptor.ts +16 -9
- package/src/sample/tcp/recovering-skeleton/skeleton-client.ts +4 -2
- package/src/sample/tcp/recovering-skeleton/skeleton-server.ts +4 -2
- package/src/sample/tcp/skeleton/app.ts +10 -15
- package/src/sample/tcp/skeleton/skeleton-session.ts +8 -4
- package/src/sample/tcp/tls-trade-capture/app.ts +8 -31
- package/src/sample/tcp/trade-capture/app-launcher.ts +22 -0
- package/src/sample/tcp/trade-capture/app.ts +3 -26
- package/src/sample/tcp/trade-capture/trade-capture-client.ts +2 -1
- package/src/sample/tcp/trade-capture/trade-capture-server.ts +2 -1
- package/src/sample/tcp/trade-capture/trade-factory.ts +7 -1
- package/src/store/fix-msg-ascii-store-resend.ts +3 -2
- package/src/store/fix-msg-memory-store.ts +1 -1
- package/src/store/fix-msg-store-record.ts +6 -0
- package/src/store/fix-msg-store-state.ts +6 -0
- package/src/store/fix-msg-store.ts +1 -7
- package/src/transport/ascii/ascii-msg-transmitter.ts +9 -5
- package/src/transport/ascii/ascii-session-msg-factory.ts +2 -2
- package/src/transport/ascii/ascii-session.ts +9 -6
- package/src/transport/ascii/index.ts +0 -1
- package/src/transport/duplex/http-duplex.ts +1 -1
- package/src/transport/duplex/tcp-duplex.ts +4 -1
- package/src/transport/factory/index.ts +1 -0
- package/src/transport/factory/msg-transport.ts +55 -0
- package/src/transport/fix-acceptor.ts +2 -2
- package/src/transport/fix-entity.ts +9 -0
- package/src/transport/fix-initiator.ts +2 -2
- package/src/transport/fixml/fixml-msg-transmitter.ts +8 -4
- package/src/transport/fixml/fixml-session-msg-factory.ts +2 -2
- package/src/transport/fixml/fixml-session.ts +2 -2
- package/src/transport/fixml/index.ts +0 -2
- package/src/transport/http/html-options.ts +8 -0
- package/src/transport/http/html-route.ts +6 -0
- package/src/transport/http/http-acceptor-listener.ts +42 -0
- package/src/transport/http/http-acceptor.ts +5 -2
- package/src/transport/http/http-adapter.ts +7 -0
- package/src/transport/http/http-initiator.ts +40 -25
- package/src/transport/http/http-json-sample-adapter.ts +7 -2
- package/src/transport/http/http-transaction.ts +1 -1
- package/src/transport/http/http-transport-description.ts +9 -0
- package/src/transport/http/index.ts +1 -0
- package/src/transport/index.ts +11 -10
- package/src/transport/msg-application.ts +13 -0
- package/src/transport/msg-transmitter.ts +5 -5
- package/src/transport/{a-session-msg-factory.ts → session/a-session-msg-factory.ts} +4 -4
- package/src/transport/session/fix-session-state-args.ts +9 -0
- package/src/transport/{fix-session-state.ts → session/fix-session-state.ts} +4 -44
- package/src/transport/{fix-session.ts → session/fix-session.ts} +10 -7
- package/src/transport/{make-fixl-session.ts → session/make-fix-session.ts} +1 -1
- package/src/transport/session/session-description.ts +18 -0
- package/src/transport/{fix-msg-factory.ts → session/session-msg-factory.ts} +2 -2
- package/src/transport/session/session-state.ts +25 -0
- package/src/transport/tcp/index.ts +3 -2
- package/src/transport/tcp/recovering-tcp-initiator.ts +24 -13
- package/src/transport/tcp/tcp-acceptor-listener.ts +45 -0
- package/src/transport/tcp/tcp-acceptor.ts +11 -10
- package/src/transport/tcp/tcp-initiator-connector.ts +71 -0
- package/src/transport/tcp/tcp-initiator.ts +10 -6
- package/src/transport/tcp/tcp-transport-description.ts +7 -0
- package/src/transport/tcp/tls-options-factory.ts +55 -0
- package/src/transport/tcp/tls-options.ts +9 -51
- package/src/transport/tick-action.ts +8 -0
- package/src/util/definition-factory.ts +47 -0
- package/src/util/dictionary-path.ts +4 -0
- package/src/util/index.ts +1 -1
- package/src/util/json-helper.ts +14 -4
- package/src/util/message-generator.ts +6 -3
- package/src/util/replay.ts +26 -21
- package/tsconfig.json +2 -0
- package/dist/buffer/ascii-chars.js.map +0 -1
- package/dist/dictionary/fields-dispatch.js +0 -40
- package/dist/dictionary/fields-dispatch.js.map +0 -1
- package/dist/sample/tcp/recovering-skeleton/respawn-2.d.ts +0 -2
- package/dist/sample/tcp/recovering-skeleton/respawn-2.js +0 -3
- package/dist/sample/tcp/recovering-skeleton/respawn-2.js.map +0 -1
- package/dist/store/fix-msg-ascii-store-recovery.d.ts +0 -12
- package/dist/store/fix-msg-ascii-store-recovery.js +0 -60
- package/dist/store/fix-msg-ascii-store-recovery.js.map +0 -1
- package/dist/store/fix-msg-ascii-store-replay.d.ts +0 -13
- package/dist/store/fix-msg-ascii-store-replay.js +0 -60
- package/dist/store/fix-msg-ascii-store-replay.js.map +0 -1
- package/dist/store/fix-replay-record.d.ts +0 -12
- package/dist/store/fix-replay-record.js +0 -12
- package/dist/store/fix-replay-record.js.map +0 -1
- package/dist/store/fix-resend-record.d.ts +0 -12
- package/dist/store/fix-resend-record.js +0 -12
- package/dist/store/fix-resend-record.js.map +0 -1
- package/dist/store/replay-record.d.ts +0 -6
- package/dist/store/replay-record.js.map +0 -1
- package/dist/store/store-replay-record.d.ts +0 -12
- package/dist/store/store-replay-record.js +0 -12
- package/dist/store/store-replay-record.js.map +0 -1
- package/dist/tcp/tls-options.d.ts +0 -5
- package/dist/tcp/tls-options.js +0 -45
- package/dist/tcp/tls-options.js.map +0 -1
- package/dist/test/ascii-encode.test.d.ts +0 -1
- package/dist/test/ascii-encode.test.js.map +0 -1
- package/dist/test/ascii-store-recovery.test.d.ts +0 -1
- package/dist/test/ascii-store-recovery.test.js +0 -50
- package/dist/test/ascii-store-recovery.test.js.map +0 -1
- package/dist/transport/ascii-session-msg-factory.d.ts +0 -16
- package/dist/transport/ascii-session-msg-factory.js +0 -47
- package/dist/transport/ascii-session-msg-factory.js.map +0 -1
- package/dist/transport/fixml/acceptor.d.ts +0 -3
- package/dist/transport/fixml/acceptor.js +0 -38
- package/dist/transport/fixml/acceptor.js.map +0 -1
- package/dist/transport/fixml-session-msg-factory.d.ts +0 -13
- package/dist/transport/fixml-session-msg-factory.js +0 -68
- package/dist/transport/fixml-session-msg-factory.js.map +0 -1
- package/dist/transport/make-config.d.ts +0 -4
- package/dist/transport/make-config.js +0 -31
- package/dist/transport/make-config.js.map +0 -1
- package/dist/transport/make-fixl-session.js.map +0 -1
- package/dist/transport/msg-transport.js +0 -57
- package/dist/transport/msg-transport.js.map +0 -1
- package/dist/transport/tcp/acceptor.d.ts +0 -3
- package/dist/transport/tcp/acceptor.js +0 -40
- package/dist/transport/tcp/acceptor.js.map +0 -1
- package/dist/transport/tcp/initiator.d.ts +0 -3
- package/dist/transport/tcp/initiator.js +0 -67
- package/dist/transport/tcp/initiator.js.map +0 -1
- package/dist/transport/tcp/recovering-initiator.d.ts +0 -17
- package/dist/transport/tcp/recovering-initiator.js +0 -30
- package/dist/transport/tcp/recovering-initiator.js.map +0 -1
- package/dist/transport/tcp/recovering_initiator.d.ts +0 -12
- package/dist/transport/tcp/recovering_initiator.js +0 -25
- package/dist/transport/tcp/recovering_initiator.js.map +0 -1
- package/dist/transport/tcp/resilient-initiator.d.ts +0 -12
- package/dist/transport/tcp/resilient-initiator.js +0 -41
- package/dist/transport/tcp/resilient-initiator.js.map +0 -1
- package/dist/types/FIX4.4/quickfix/set/header.d.ts +0 -31
- package/dist/types/FIX4.4/quickfix/set/header.js.map +0 -1
- package/dist/types/FIX4.4/quickfix/set/trailer.d.ts +0 -6
- package/dist/types/FIX4.4/quickfix/set/trailer.js.map +0 -1
- package/dist/util/dictionary-definitions.d.ts +0 -8
- package/dist/util/dictionary-definitions.js +0 -51
- package/dist/util/dictionary-definitions.js.map +0 -1
- package/src/dictionary/fields-dispatch.ts +0 -45
- package/src/sample/launcher.ts +0 -56
- package/src/transport/fixml/acceptor.ts +0 -29
- package/src/transport/make-config.ts +0 -19
- package/src/transport/msg-transport.ts +0 -67
- package/src/transport/session-description.ts +0 -70
- package/src/transport/tcp/acceptor.ts +0 -31
- package/src/transport/tcp/initiator.ts +0 -59
- package/src/util/dictionary-definitions.ts +0 -41
|
@@ -9,25 +9,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
require("reflect-metadata");
|
|
12
13
|
const path = require("path");
|
|
13
|
-
const buffer_1 = require("../buffer");
|
|
14
|
-
const transport_1 = require("../transport");
|
|
15
|
-
const config_1 = require("../config");
|
|
16
14
|
const quickfix_1 = require("../types/FIX4.4/quickfix");
|
|
17
|
-
const
|
|
18
|
-
const ascii_1 = require("../transport/ascii");
|
|
15
|
+
const setup_1 = require("./env/setup");
|
|
19
16
|
const root = path.join(__dirname, '../../data');
|
|
20
17
|
let definitions;
|
|
21
18
|
let session;
|
|
22
19
|
let views;
|
|
23
20
|
let structure;
|
|
24
21
|
let view;
|
|
22
|
+
let setup = null;
|
|
25
23
|
beforeAll(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
session =
|
|
30
|
-
views = yield
|
|
24
|
+
setup = new setup_1.Setup('session/qf-fix44.json', null);
|
|
25
|
+
yield setup.init();
|
|
26
|
+
definitions = setup.definitions;
|
|
27
|
+
session = setup.client.transmitter;
|
|
28
|
+
views = yield setup.client.replayer.replayFixFile(path.join(root, 'examples/FIX.4.4/quickfix/md-data-snapshot/fix.txt'));
|
|
31
29
|
if (views && views.length > 0) {
|
|
32
30
|
view = views[0];
|
|
33
31
|
structure = view.structure;
|
|
@@ -138,29 +136,6 @@ function toFixMessage(o, msg) {
|
|
|
138
136
|
session.encodeMessage(msg.msgType, o);
|
|
139
137
|
return session.buffer.toString();
|
|
140
138
|
}
|
|
141
|
-
class ParsingResult {
|
|
142
|
-
constructor(event, msgType, view, contents, parser) {
|
|
143
|
-
this.event = event;
|
|
144
|
-
this.msgType = msgType;
|
|
145
|
-
this.view = view;
|
|
146
|
-
this.contents = contents;
|
|
147
|
-
this.parser = parser;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
function toParse(text, chunks = false) {
|
|
151
|
-
return new Promise((resolve, reject) => {
|
|
152
|
-
const parser = new buffer_1.AsciiParser(definitions, new transport_1.StringDuplex(text, chunks).readable, buffer_1.AsciiChars.Pipe);
|
|
153
|
-
parser.on('error', (e) => {
|
|
154
|
-
reject(e);
|
|
155
|
-
});
|
|
156
|
-
parser.on('msg', (msgType, view) => {
|
|
157
|
-
resolve(new ParsingResult('msg', msgType, view.clone(), parser.state.elasticBuffer.toString(), parser));
|
|
158
|
-
});
|
|
159
|
-
parser.on('done', () => {
|
|
160
|
-
resolve(new ParsingResult('done', null, null, parser.state.elasticBuffer.toString(), parser));
|
|
161
|
-
});
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
139
|
function BidOfferRequest(symbol) {
|
|
165
140
|
return {
|
|
166
141
|
MDReqID: '1',
|
|
@@ -192,7 +167,7 @@ test('market data request', () => __awaiter(void 0, void 0, void 0, function* ()
|
|
|
192
167
|
const def = definitions.message.get('MarketDataRequest');
|
|
193
168
|
const fix = toFixMessage(mdr, def);
|
|
194
169
|
expect(fix).toBeTruthy();
|
|
195
|
-
const res = yield
|
|
170
|
+
const res = yield setup.client.parseText(fix);
|
|
196
171
|
expect(res.event).toEqual('msg');
|
|
197
172
|
expect(res.msgType).toEqual(def.msgType);
|
|
198
173
|
const gv = res.view.getView('MDReqGrp');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view-decode.test.js","sourceRoot":"","sources":["../../src/test/view-decode.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,6BAA4B;AAC5B,sCAAuE;AAGvE,4CAAqF;AACrF,sCAAuC;AACvC,uDAAmH;AACnH,kCAAuD;AACvD,8CAA2D;AAE3D,MAAM,IAAI,GAAW,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,CAAA;AAEvD,IAAI,WAA2B,CAAA;AAC/B,IAAI,OAA4B,CAAA;AAChC,IAAI,KAAgB,CAAA;AACpB,IAAI,SAAoB,CAAA;AACxB,IAAI,IAAa,CAAA;AAEjB,SAAS,CAAC,GAAS,EAAE;IACnB,MA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AM,GAAG,GAAG,eAAe,CAAC,SAAS,CAAC,CAAA;IACtC,MAAM,GAAG,GAAG,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAA;IACxD,MAAM,GAAG,GAAG,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;IAClC,MAAM,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,CAAA;IACxB,MAAM,GAAG,GAAkB,MAAM,OAAO,CAAC,GAAG,CAAC,CAAA;IAC7C,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAChC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;IACxC,MAAM,EAAE,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAA;IACvC,MAAM,CAAC,EAAE,CAAC,CAAC,UAAU,EAAE,CAAA;IACvB,MAAM,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAA;IACvB,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAA;IACjC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,+DAA+D,OAAO,kCAAkC,CAAC,CAAA;IAC3H,MAAM,EAAE,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,8BAA8B,CAAC,CAAA;IAC3D,MAAM,CAAC,EAAE,CAAC,CAAC,UAAU,EAAE,CAAA;IACvB,MAAM,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAA;IACxB,MAAM,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,wDAAwD,OAAO,EAAE,CAAC,CAAA;AACvF,CAAC,CAAA,CAAC,CAAA","sourcesContent":["import * as path from 'path'\r\nimport { Structure, AsciiChars, MsgView, AsciiParser } from '../buffer'\r\nimport { ILooseObject } from '../collections/collection'\r\nimport { FixDefinitions, MessageDefinition } from '../dictionary'\r\nimport { ISessionDescription, AsciiMsgTransmitter, StringDuplex } from '../transport'\r\nimport { JsFixConfig } from '../config'\r\nimport { IInstrumentLeg, IMarketDataRequest, MDEntryType, SubscriptionRequestType } from '../types/FIX4.4/quickfix'\r\nimport { getDefinitions, replayFixFile } from '../util'\r\nimport { AsciiSessionMsgFactory } from '../transport/ascii'\r\n\r\nconst root: string = path.join(__dirname, '../../data')\r\n\r\nlet definitions: FixDefinitions\r\nlet session: AsciiMsgTransmitter\r\nlet views: MsgView[]\r\nlet structure: Structure\r\nlet view: MsgView\r\n\r\nbeforeAll(async () => {\r\n const sessionDescription: ISessionDescription = require(path.join(root, 'session/qf-fix44.json'))\r\n definitions = await getDefinitions(sessionDescription.application.dictionary)\r\n const config = new JsFixConfig(new AsciiSessionMsgFactory(sessionDescription), definitions, sessionDescription, AsciiChars.Pipe)\r\n session = new AsciiMsgTransmitter(config)\r\n views = await replayFixFile(definitions, sessionDescription, path.join(root, 'examples/FIX.4.4/quickfix/md-data-snapshot/fix.txt'), AsciiChars.Pipe)\r\n if (views && views.length > 0) {\r\n view = views[0]\r\n structure = view.structure\r\n }\r\n}, 45000)\r\n\r\ntest('expect a structure from fix msg', () => {\r\n expect(structure).toBeTruthy()\r\n})\r\n\r\ntest('get NoMDEntries directly - expect an array', () => {\r\n const noMDEntriesView: MsgView = view.getView('NoMDEntries')\r\n expect(noMDEntriesView).toBeTruthy()\r\n const noMDEntries: ILooseObject[] = noMDEntriesView.toObject()\r\n expect(Array.isArray(noMDEntries)).toEqual(true)\r\n expect(noMDEntries.length).toEqual(2)\r\n})\r\n\r\ntest('get NoMDEntries via MDFullGrp - array within a component', () => {\r\n const mdFullGrp: MsgView = view.getView('MDFullGrp')\r\n expect(mdFullGrp).toBeTruthy()\r\n const mdFullGrpAsObject: ILooseObject = mdFullGrp.toObject()\r\n const noMDEntries: ILooseObject[] = mdFullGrpAsObject.NoMDEntries\r\n expect(Array.isArray(noMDEntries)).toEqual(true)\r\n expect(noMDEntries.length).toEqual(2)\r\n})\r\n\r\nfunction getMdEntriesObjects (): ILooseObject[] {\r\n const noMDEntriesView: MsgView = view.getView('NoMDEntries')\r\n expect(noMDEntriesView).toBeTruthy()\r\n const noMDEntries: ILooseObject[] = noMDEntriesView.toObject()\r\n expect(Array.isArray(noMDEntries)).toEqual(true)\r\n expect(noMDEntries.length).toEqual(2)\r\n return noMDEntries\r\n}\r\n\r\n// <field number='272' name='MDEntryDate' type='UTCDATEONLY' />\r\n\r\ntest('get UTCDATEONLY from NoMDEntries instance 1', () => {\r\n const noMdEntriesAsObjects: ILooseObject[] = getMdEntriesObjects()\r\n const noMDEntriesView: MsgView = view.getView('NoMDEntries')\r\n const mmEntryView: MsgView = noMDEntriesView.getGroupInstance(1)\r\n\r\n const instance: ILooseObject = noMdEntriesAsObjects[1]\r\n const mmEntryDateAsString: string = mmEntryView.getString('MDEntryDate')\r\n expect(mmEntryDateAsString).toEqual('20210129')\r\n expect(mmEntryView.getString(272)).toEqual('20210129')\r\n const asUtc: Date = new Date(Date.UTC(2021, 0, 29))\r\n expect(instance.MDEntryDate).toEqual(asUtc)\r\n})\r\n\r\n// <field number='273' name='MDEntryTime' type='UTCTIMEONLY' />\r\n\r\ntest('get UTCTIMEONLY from NoMDEntries instance 0', () => {\r\n const noMdEntriesAsObjects: ILooseObject[] = getMdEntriesObjects()\r\n const noMDEntriesView: MsgView = view.getView('NoMDEntries')\r\n const mmEntryView: MsgView = noMDEntriesView.getGroupInstance(0)\r\n\r\n const instance: ILooseObject = noMdEntriesAsObjects[0]\r\n const mmEntryTimeAsString: string = mmEntryView.getString('MDEntryTime')\r\n expect(mmEntryTimeAsString).toEqual('19:45:19.852')\r\n expect(mmEntryView.getString(273)).toEqual('19:45:19.852')\r\n const asUtc: Date = new Date(Date.UTC(0, 0, 0, 19, 45, 19, 852))\r\n expect(instance.MDEntryTime).toEqual(asUtc)\r\n})\r\n\r\n// <field number='126' name='ExpireTime' type='UTCTIMESTAMP' />\r\n\r\ntest('get UTCTIMESTAMP from NoMDEntries instance 1', () => {\r\n const noMdEntriesAsObjects: ILooseObject[] = getMdEntriesObjects()\r\n const noMDEntriesView: MsgView = view.getView('NoMDEntries')\r\n const mmEntryView: MsgView = noMDEntriesView.getGroupInstance(1)\r\n\r\n const instance: ILooseObject = noMdEntriesAsObjects[1]\r\n const mmEntryExpireTimeAsString: string = mmEntryView.getString('ExpireTime')\r\n expect(mmEntryExpireTimeAsString).toEqual('20210129-19:45:19.000')\r\n expect(mmEntryView.getString(126)).toEqual('20210129-19:45:19.000')\r\n const asUtc: Date = new Date(Date.UTC(2021, 0, 29, 19, 45, 19, 0))\r\n const d: Date = instance.ExpireTime\r\n expect(d).toEqual(asUtc)\r\n})\r\n\r\n// <field number='110' name='MinQty' type='QTY' />\r\n\r\ntest('get MinQty from NoMDEntries instance 1', () => {\r\n const noMdEntriesAsObjects: ILooseObject[] = getMdEntriesObjects()\r\n const noMDEntriesView: MsgView = view.getView('NoMDEntries')\r\n const mmEntryView: MsgView = noMDEntriesView.getGroupInstance(1)\r\n\r\n const instance: ILooseObject = noMdEntriesAsObjects[1]\r\n const mmEntryMinQtyAsString: string = mmEntryView.getString('MinQty')\r\n expect(mmEntryMinQtyAsString).toEqual('9.6478')\r\n expect(mmEntryView.getString(110)).toEqual('9.6478')\r\n expect(instance.MinQty).toEqual(9.6478)\r\n})\r\n\r\ntest('get selection tags one call - tag ids', () => {\r\n const [a, b, c, d] = view.getTypedTags([8, 9, 35, 49])\r\n expect(a).toEqual('FIX4.4')\r\n expect(b).toEqual(3957)\r\n expect(c).toEqual('W')\r\n expect(d).toEqual('init-comp')\r\n})\r\n\r\n/*\r\n[0] 8 (BeginString) = FIX4.4, [1] 9 (BodyLength) = 0002955\r\n[2] 35 (MsgType) = W[MARKET_DATA_SNAPSHOT_FULL_REFRESH], [3] 49 (SenderCompID) = sender-10\r\n[4] 56 (TargetCompID) = target-20, [5] 34 (MsgSeqNum) = 1\r\n[6] 57 (TargetSubID) = sub-a, [7] 52 (SendingTime) = 20180608-21:10:59.047\r\n[8] 262 (MDReqID) = ipsum, [9] 55 (Symbol) = sit\r\n */\r\n\r\ntest('get selection tags one call - tag names', () => {\r\n const [a, b, c, d, e, f] = view.getTypedTags([\r\n 'BeginString',\r\n 'BodyLength',\r\n 'MsgType',\r\n 'MsgSeqNum',\r\n 'MDReqID',\r\n 'Symbol'])\r\n expect(a).toEqual('FIX4.4')\r\n expect(b).toEqual(3957)\r\n expect(c).toEqual('W')\r\n expect(d).toEqual(1)\r\n expect(e).toEqual('Lorem')\r\n expect(f).toEqual('ipsum')\r\n})\r\n\r\ntest('nested view fetch' , () => {\r\n const legGrpView = view.getView('InstrmtLegGrp.NoLegs')\r\n expect(legGrpView).toBeTruthy()\r\n const legGrp: IInstrumentLeg[] = legGrpView.toObject()\r\n expect(legGrp).toBeTruthy()\r\n expect(Array.isArray(legGrp))\r\n expect(legGrp.length).toEqual(3)\r\n})\r\n\r\nfunction toFixMessage (o: ILooseObject, msg: MessageDefinition): string {\r\n session.encodeMessage(msg.msgType, o)\r\n return session.buffer.toString()\r\n}\r\n\r\nclass ParsingResult {\r\n constructor (public readonly event: string, public readonly msgType: string, public readonly view: MsgView,\r\n public readonly contents: string, public readonly parser: AsciiParser) {\r\n }\r\n}\r\n\r\nfunction toParse (text: string, chunks: boolean = false): Promise<ParsingResult> {\r\n return new Promise<any>((resolve, reject) => {\r\n const parser = new AsciiParser(definitions, new StringDuplex(text, chunks).readable, AsciiChars.Pipe)\r\n parser.on('error', (e: Error) => {\r\n reject(e)\r\n })\r\n parser.on('msg', (msgType: string, view: MsgView) => {\r\n resolve(new ParsingResult('msg', msgType, view.clone(), parser.state.elasticBuffer.toString(), parser))\r\n })\r\n parser.on('done', () => {\r\n resolve(new ParsingResult('done', null,null, parser.state.elasticBuffer.toString(), parser))\r\n })\r\n })\r\n}\r\n\r\nfunction BidOfferRequest (symbol: string): IMarketDataRequest {\r\n return {\r\n MDReqID: '1',\r\n SubscriptionRequestType: SubscriptionRequestType.SnapshotPlusUpdates,\r\n MarketDepth: 0,\r\n MDReqGrp: {\r\n NoMDEntryTypes: [\r\n {\r\n MDEntryType: MDEntryType.Bid\r\n },\r\n {\r\n MDEntryType: MDEntryType.Offer\r\n }\r\n ]\r\n },\r\n InstrmtMDReqGrp: {\r\n NoRelatedSym: [\r\n {\r\n Instrument: {\r\n Symbol: symbol\r\n }\r\n }\r\n ]\r\n }\r\n } as IMarketDataRequest\r\n}\r\n\r\ntest('market data request', async () => {\r\n const mdr = BidOfferRequest('EUR/USD')\r\n const def = definitions.message.get('MarketDataRequest')\r\n const fix = toFixMessage(mdr, def)\r\n expect(fix).toBeTruthy()\r\n const res: ParsingResult = await toParse(fix)\r\n expect(res.event).toEqual('msg')\r\n expect(res.msgType).toEqual(def.msgType)\r\n const gv = res.view.getView('MDReqGrp')\r\n expect(gv).toBeTruthy()\r\n const s = gv.toString()\r\n const newLine = require('os').EOL\r\n expect(s).toEqual(`[0] 267 (NoMDEntryTypes) = 2, [1] 269 (MDEntryType) = 0[Bid]${newLine}[2] 269 (MDEntryType) = 1[Offer]`)\r\n const iv = res.view.getView('InstrmtMDReqGrp.NoRelatedSym')\r\n expect(iv).toBeTruthy()\r\n const s2 = iv.toString()\r\n expect(s2).toEqual(`[0] 146 (NoRelatedSym) = 1, [1] 55 (Symbol) = EUR/USD${newLine}`)\r\n})\r\n"]}
|
|
1
|
+
{"version":3,"file":"view-decode.test.js","sourceRoot":"","sources":["../../src/test/view-decode.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,4BAAyB;AAEzB,6BAA4B;AAI5B,uDAAmH;AAEnH,uCAAmC;AAGnC,MAAM,IAAI,GAAW,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,CAAA;AAEvD,IAAI,WAA2B,CAAA;AAC/B,IAAI,OAA4B,CAAA;AAChC,IAAI,KAAgB,CAAA;AACpB,IAAI,SAAoB,CAAA;AACxB,IAAI,IAAa,C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AAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAA;IACxD,MAAM,GAAG,GAAG,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;IAClC,MAAM,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,CAAA;IACxB,MAAM,GAAG,GAAkB,MAAM,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAA;IAC5D,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAChC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;IACxC,MAAM,EAAE,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAA;IACvC,MAAM,CAAC,EAAE,CAAC,CAAC,UAAU,EAAE,CAAA;IACvB,MAAM,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAA;IACvB,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAA;IACjC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,+DAA+D,OAAO,kCAAkC,CAAC,CAAA;IAC3H,MAAM,EAAE,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,8BAA8B,CAAC,CAAA;IAC3D,MAAM,CAAC,EAAE,CAAC,CAAC,UAAU,EAAE,CAAA;IACvB,MAAM,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAA;IACxB,MAAM,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,wDAAwD,OAAO,EAAE,CAAC,CAAA;AACvF,CAAC,CAAA,CAAC,CAAA","sourcesContent":["import 'reflect-metadata'\r\n\r\nimport * as path from 'path'\r\nimport { Structure, MsgView } from '../buffer'\r\nimport { ILooseObject } from '../collections/collection'\r\nimport { FixDefinitions, MessageDefinition } from '../dictionary/definition'\r\nimport { IInstrumentLeg, IMarketDataRequest, MDEntryType, SubscriptionRequestType } from '../types/FIX4.4/quickfix'\r\nimport { AsciiMsgTransmitter } from '../transport/ascii/ascii-msg-transmitter'\r\nimport { Setup } from './env/setup'\r\nimport { ParsingResult } from './env/parsing-result'\r\n\r\nconst root: string = path.join(__dirname, '../../data')\r\n\r\nlet definitions: FixDefinitions\r\nlet session: AsciiMsgTransmitter\r\nlet views: MsgView[]\r\nlet structure: Structure\r\nlet view: MsgView\r\nlet setup: Setup = null\r\n\r\nbeforeAll(async () => {\r\n setup = new Setup('session/qf-fix44.json',null)\r\n await setup.init()\r\n definitions = setup.definitions\r\n session = setup.client.transmitter as AsciiMsgTransmitter\r\n views = await setup.client.replayer.replayFixFile(path.join(root, 'examples/FIX.4.4/quickfix/md-data-snapshot/fix.txt'))\r\n if (views && views.length > 0) {\r\n view = views[0]\r\n structure = view.structure\r\n }\r\n}, 45000)\r\n\r\ntest('expect a structure from fix msg', () => {\r\n expect(structure).toBeTruthy()\r\n})\r\n\r\ntest('get NoMDEntries directly - expect an array', () => {\r\n const noMDEntriesView: MsgView = view.getView('NoMDEntries')\r\n expect(noMDEntriesView).toBeTruthy()\r\n const noMDEntries: ILooseObject[] = noMDEntriesView.toObject()\r\n expect(Array.isArray(noMDEntries)).toEqual(true)\r\n expect(noMDEntries.length).toEqual(2)\r\n})\r\n\r\ntest('get NoMDEntries via MDFullGrp - array within a component', () => {\r\n const mdFullGrp: MsgView = view.getView('MDFullGrp')\r\n expect(mdFullGrp).toBeTruthy()\r\n const mdFullGrpAsObject: ILooseObject = mdFullGrp.toObject()\r\n const noMDEntries: ILooseObject[] = mdFullGrpAsObject.NoMDEntries\r\n expect(Array.isArray(noMDEntries)).toEqual(true)\r\n expect(noMDEntries.length).toEqual(2)\r\n})\r\n\r\nfunction getMdEntriesObjects (): ILooseObject[] {\r\n const noMDEntriesView: MsgView = view.getView('NoMDEntries')\r\n expect(noMDEntriesView).toBeTruthy()\r\n const noMDEntries: ILooseObject[] = noMDEntriesView.toObject()\r\n expect(Array.isArray(noMDEntries)).toEqual(true)\r\n expect(noMDEntries.length).toEqual(2)\r\n return noMDEntries\r\n}\r\n\r\n// <field number='272' name='MDEntryDate' type='UTCDATEONLY' />\r\n\r\ntest('get UTCDATEONLY from NoMDEntries instance 1', () => {\r\n const noMdEntriesAsObjects: ILooseObject[] = getMdEntriesObjects()\r\n const noMDEntriesView: MsgView = view.getView('NoMDEntries')\r\n const mmEntryView: MsgView = noMDEntriesView.getGroupInstance(1)\r\n\r\n const instance: ILooseObject = noMdEntriesAsObjects[1]\r\n const mmEntryDateAsString: string = mmEntryView.getString('MDEntryDate')\r\n expect(mmEntryDateAsString).toEqual('20210129')\r\n expect(mmEntryView.getString(272)).toEqual('20210129')\r\n const asUtc: Date = new Date(Date.UTC(2021, 0, 29))\r\n expect(instance.MDEntryDate).toEqual(asUtc)\r\n})\r\n\r\n// <field number='273' name='MDEntryTime' type='UTCTIMEONLY' />\r\n\r\ntest('get UTCTIMEONLY from NoMDEntries instance 0', () => {\r\n const noMdEntriesAsObjects: ILooseObject[] = getMdEntriesObjects()\r\n const noMDEntriesView: MsgView = view.getView('NoMDEntries')\r\n const mmEntryView: MsgView = noMDEntriesView.getGroupInstance(0)\r\n\r\n const instance: ILooseObject = noMdEntriesAsObjects[0]\r\n const mmEntryTimeAsString: string = mmEntryView.getString('MDEntryTime')\r\n expect(mmEntryTimeAsString).toEqual('19:45:19.852')\r\n expect(mmEntryView.getString(273)).toEqual('19:45:19.852')\r\n const asUtc: Date = new Date(Date.UTC(0, 0, 0, 19, 45, 19, 852))\r\n expect(instance.MDEntryTime).toEqual(asUtc)\r\n})\r\n\r\n// <field number='126' name='ExpireTime' type='UTCTIMESTAMP' />\r\n\r\ntest('get UTCTIMESTAMP from NoMDEntries instance 1', () => {\r\n const noMdEntriesAsObjects: ILooseObject[] = getMdEntriesObjects()\r\n const noMDEntriesView: MsgView = view.getView('NoMDEntries')\r\n const mmEntryView: MsgView = noMDEntriesView.getGroupInstance(1)\r\n\r\n const instance: ILooseObject = noMdEntriesAsObjects[1]\r\n const mmEntryExpireTimeAsString: string = mmEntryView.getString('ExpireTime')\r\n expect(mmEntryExpireTimeAsString).toEqual('20210129-19:45:19.000')\r\n expect(mmEntryView.getString(126)).toEqual('20210129-19:45:19.000')\r\n const asUtc: Date = new Date(Date.UTC(2021, 0, 29, 19, 45, 19, 0))\r\n const d: Date = instance.ExpireTime\r\n expect(d).toEqual(asUtc)\r\n})\r\n\r\n// <field number='110' name='MinQty' type='QTY' />\r\n\r\ntest('get MinQty from NoMDEntries instance 1', () => {\r\n const noMdEntriesAsObjects: ILooseObject[] = getMdEntriesObjects()\r\n const noMDEntriesView: MsgView = view.getView('NoMDEntries')\r\n const mmEntryView: MsgView = noMDEntriesView.getGroupInstance(1)\r\n\r\n const instance: ILooseObject = noMdEntriesAsObjects[1]\r\n const mmEntryMinQtyAsString: string = mmEntryView.getString('MinQty')\r\n expect(mmEntryMinQtyAsString).toEqual('9.6478')\r\n expect(mmEntryView.getString(110)).toEqual('9.6478')\r\n expect(instance.MinQty).toEqual(9.6478)\r\n})\r\n\r\ntest('get selection tags one call - tag ids', () => {\r\n const [a, b, c, d] = view.getTypedTags([8, 9, 35, 49])\r\n expect(a).toEqual('FIX4.4')\r\n expect(b).toEqual(3957)\r\n expect(c).toEqual('W')\r\n expect(d).toEqual('init-comp')\r\n})\r\n\r\n/*\r\n[0] 8 (BeginString) = FIX4.4, [1] 9 (BodyLength) = 0002955\r\n[2] 35 (MsgType) = W[MARKET_DATA_SNAPSHOT_FULL_REFRESH], [3] 49 (SenderCompID) = sender-10\r\n[4] 56 (TargetCompID) = target-20, [5] 34 (MsgSeqNum) = 1\r\n[6] 57 (TargetSubID) = sub-a, [7] 52 (SendingTime) = 20180608-21:10:59.047\r\n[8] 262 (MDReqID) = ipsum, [9] 55 (Symbol) = sit\r\n */\r\n\r\ntest('get selection tags one call - tag names', () => {\r\n const [a, b, c, d, e, f] = view.getTypedTags([\r\n 'BeginString',\r\n 'BodyLength',\r\n 'MsgType',\r\n 'MsgSeqNum',\r\n 'MDReqID',\r\n 'Symbol'])\r\n expect(a).toEqual('FIX4.4')\r\n expect(b).toEqual(3957)\r\n expect(c).toEqual('W')\r\n expect(d).toEqual(1)\r\n expect(e).toEqual('Lorem')\r\n expect(f).toEqual('ipsum')\r\n})\r\n\r\ntest('nested view fetch' , () => {\r\n const legGrpView = view.getView('InstrmtLegGrp.NoLegs')\r\n expect(legGrpView).toBeTruthy()\r\n const legGrp: IInstrumentLeg[] = legGrpView.toObject()\r\n expect(legGrp).toBeTruthy()\r\n expect(Array.isArray(legGrp))\r\n expect(legGrp.length).toEqual(3)\r\n})\r\n\r\nfunction toFixMessage (o: ILooseObject, msg: MessageDefinition): string {\r\n session.encodeMessage(msg.msgType, o)\r\n return session.buffer.toString()\r\n}\r\n\r\nfunction BidOfferRequest (symbol: string): IMarketDataRequest {\r\n return {\r\n MDReqID: '1',\r\n SubscriptionRequestType: SubscriptionRequestType.SnapshotPlusUpdates,\r\n MarketDepth: 0,\r\n MDReqGrp: {\r\n NoMDEntryTypes: [\r\n {\r\n MDEntryType: MDEntryType.Bid\r\n },\r\n {\r\n MDEntryType: MDEntryType.Offer\r\n }\r\n ]\r\n },\r\n InstrmtMDReqGrp: {\r\n NoRelatedSym: [\r\n {\r\n Instrument: {\r\n Symbol: symbol\r\n }\r\n }\r\n ]\r\n }\r\n } as IMarketDataRequest\r\n}\r\n\r\ntest('market data request', async () => {\r\n const mdr = BidOfferRequest('EUR/USD')\r\n const def = definitions.message.get('MarketDataRequest')\r\n const fix = toFixMessage(mdr, def)\r\n expect(fix).toBeTruthy()\r\n const res: ParsingResult = await setup.client.parseText(fix)\r\n expect(res.event).toEqual('msg')\r\n expect(res.msgType).toEqual(def.msgType)\r\n const gv = res.view.getView('MDReqGrp')\r\n expect(gv).toBeTruthy()\r\n const s = gv.toString()\r\n const newLine = require('os').EOL\r\n expect(s).toEqual(`[0] 267 (NoMDEntryTypes) = 2, [1] 269 (MDEntryType) = 0[Bid]${newLine}[2] 269 (MDEntryType) = 1[Offer]`)\r\n const iv = res.view.getView('InstrmtMDReqGrp.NoRelatedSym')\r\n expect(iv).toBeTruthy()\r\n const s2 = iv.toString()\r\n expect(s2).toEqual(`[0] 146 (NoRelatedSym) = 1, [1] 55 (Symbol) = EUR/USD${newLine}`)\r\n})\r\n"]}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=time-formatter.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time-formatter.test.js","sourceRoot":"","sources":["../src/test/time-formatter.test.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
|
File without changes
|
package/dist/to-views.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=to-views.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"to-views.js","sourceRoot":"","sources":["../src/test/to-views.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
package/dist/token.txt
ADDED
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
[0] 8 (BeginString) = FIX4.4, [1] 9 (BodyLength) = 0004996
|
|
2
|
+
[2] 35 (MsgType) = AE[TradeCaptureReport], [3] 49 (SenderCompID) = init-comp
|
|
3
|
+
[4] 56 (TargetCompID) = accept-comp, [5] 34 (MsgSeqNum) = 1
|
|
4
|
+
[6] 57 (TargetSubID) = fix, [7] 52 (SendingTime) = 20211227-14:01:51.366
|
|
5
|
+
[8] 571 (TradeReportID) = Lorem, [9] 856 (TradeReportType) = 3[Decline]
|
|
6
|
+
[10] 568 (TradeRequestID) = ipsum, [11] 828 (TrdType) = 1[BlockTrade]
|
|
7
|
+
[12] 829 (TrdSubType) = 78693, [13] 830 (TransferReason) = dolor
|
|
8
|
+
[14] 150 (ExecType) = D[Restated], [15] 748 (TotNumTradeReports) = 50836
|
|
9
|
+
[16] 912 (LastRptRequested) = Y, [17] 263 (SubscriptionRequestType) = 2[DisablePreviousSnapshot]
|
|
10
|
+
[18] 572 (TradeReportRefID) = sit, [19] 881 (SecondaryTradeReportRefID) = amet,
|
|
11
|
+
[20] 818 (SecondaryTradeReportID) = consectetur, [21] 820 (TradeLinkID) = adipiscing
|
|
12
|
+
[22] 880 (TrdMatchID) = elit., [23] 17 (ExecID) = Nunc
|
|
13
|
+
[24] 39 (OrdStatus) = B[Calculated], [25] 527 (SecondaryExecID) = odio
|
|
14
|
+
[26] 378 (ExecRestatementReason) = 2[VerbalChange], [27] 570 (PreviouslyReported) = Y[PerviouslyReportedToCounterparty]
|
|
15
|
+
[28] 423 (PriceType) = 2[PerUnit], [29] 55 (Symbol) = orci,
|
|
16
|
+
[30] 65 (SymbolSfx) = blandit, [31] 22 (SecurityIDSource) = 4[IsinNumber]
|
|
17
|
+
[32] 454 (NoSecurityAltID) = 1, [33] 455 (SecurityAltID) = vel
|
|
18
|
+
[34] 456 (SecurityAltIDSource) = semper, [35] 460 (Product) = 10[Mortgage]
|
|
19
|
+
[36] 461 (CFICode) = sed,, [37] 762 (SecuritySubType) = bibendum
|
|
20
|
+
[38] 200 (MaturityMonthYear) = cursus, [39] 541 (MaturityDate) = 20211227
|
|
21
|
+
[40] 201 (PutOrCall) = 1[Call], [41] 224 (CouponPaymentDate) = 20211227
|
|
22
|
+
[42] 225 (IssueDate) = 20211227, [43] 239 (RepoCollateralSecurityType) = lectus.
|
|
23
|
+
[44] 226 (RepurchaseTerm) = 45548, [45] 227 (RepurchaseRate) = 92.28
|
|
24
|
+
[46] 228 (Factor) = 0.8766, [47] 255 (CreditRating) = Aenean
|
|
25
|
+
[48] 543 (InstrRegistry) = vel, [49] 470 (CountryOfIssue) = diam
|
|
26
|
+
[50] 471 (StateOrProvinceOfIssue) = magna., [51] 472 (LocaleOfIssue) = Aenean
|
|
27
|
+
[52] 240 (RedemptionDate) = 20211227, [53] 202 (StrikePrice) = 0.0054226
|
|
28
|
+
[54] 231 (ContractMultiplier) = 0.0008984, [55] 223 (CouponRate) = 0.0053331
|
|
29
|
+
[56] 207 (SecurityExchange) = et, [57] 106 (Issuer) = viverra
|
|
30
|
+
[58] 348 (EncodedIssuerLen) = 90757, [59] 107 (SecurityDesc) = leo,
|
|
31
|
+
[60] 350 (EncodedSecurityDescLen) = 59375, [61] 691 (Pool) = non
|
|
32
|
+
[62] 875 (CPProgram) = 2[Program42], [63] 876 (CPRegType) = iaculis
|
|
33
|
+
[64] 864 (NoEvents) = 1, [65] 865 (EventType) = 3[Tender]
|
|
34
|
+
[66] 866 (EventDate) = 20211227, [67] 867 (EventPx) = 41.183
|
|
35
|
+
[68] 868 (EventText) = neque., [69] 874 (InterestAccrualDate) = 20211227
|
|
36
|
+
[70] 913 (AgreementDesc) = Nullam, [71] 914 (AgreementID) = arcu
|
|
37
|
+
[72] 915 (AgreementDate) = 20211227, [73] 918 (AgreementCurrency) = lectus,
|
|
38
|
+
[74] 916 (StartDate) = 20211227, [75] 917 (EndDate) = 20211227
|
|
39
|
+
[76] 919 (DeliveryType) = 0[VersusPayment], [77] 898 (MarginRatio) = -3.4301
|
|
40
|
+
[78] 38 (OrderQty) = -0.0007189, [79] 516 (OrderPercent) = 9.7936
|
|
41
|
+
[80] 469 (RoundingModulus) = 6317.9, [81] 854 (QtyType) = 1[Contracts]
|
|
42
|
+
[82] 235 (YieldType) = SIMPLE[SimpleYield], [83] 236 (Yield) = 2.3533
|
|
43
|
+
[84] 701 (YieldCalcDate) = 20211227, [85] 698 (YieldRedemptionPriceType) = 65958
|
|
44
|
+
[86] 711 (NoUnderlyings) = 3, [87] 311 (UnderlyingSymbol) = dignissim
|
|
45
|
+
[88] 312 (UnderlyingSymbolSfx) = eget, [89] 305 (UnderlyingSecurityIDSource) = auctor
|
|
46
|
+
[90] 457 (NoUnderlyingSecurityAltID) = 3, [91] 458 (UnderlyingSecurityAltID) = vitae,
|
|
47
|
+
[92] 459 (UnderlyingSecurityAltIDSource) = maximus, [93] 458 (UnderlyingSecurityAltID) = ac
|
|
48
|
+
[94] 459 (UnderlyingSecurityAltIDSource) = quam., [95] 458 (UnderlyingSecurityAltID) = Quisque
|
|
49
|
+
[96] 462 (UnderlyingProduct) = 40726, [97] 463 (UnderlyingCFICode) = varius
|
|
50
|
+
[98] 313 (UnderlyingMaturityMonthYear) = tincidunt, [99] 315 (UnderlyingPutOrCall) = 38931
|
|
51
|
+
[100] 242 (UnderlyingIssueDate) = 20211227, [101] 243 (UnderlyingRepoCollateralSecurityType) = auctor.
|
|
52
|
+
[102] 244 (UnderlyingRepurchaseTerm) = 61916, [103] 245 (UnderlyingRepurchaseRate) = 0.0007039
|
|
53
|
+
[104] 256 (UnderlyingCreditRating) = Class, [105] 595 (UnderlyingInstrRegistry) = aptent
|
|
54
|
+
[106] 592 (UnderlyingCountryOfIssue) = taciti, [107] 593 (UnderlyingStateOrProvinceOfIssue) = sociosqu
|
|
55
|
+
[108] 247 (UnderlyingRedemptionDate) = 20211227, [109] 316 (UnderlyingStrikePrice) = 50.65
|
|
56
|
+
[110] 941 (UnderlyingStrikeCurrency) = ad, [111] 317 (UnderlyingOptAttribute) = litora
|
|
57
|
+
[112] 436 (UnderlyingContractMultiplier) = 85.628, [113] 435 (UnderlyingCouponRate) = -0.31303
|
|
58
|
+
[114] 308 (UnderlyingSecurityExchange) = torquent, [115] 306 (UnderlyingIssuer) = per
|
|
59
|
+
[116] 364 (EncodedUnderlyingSecurityDescLen) = 93974, [117] 878 (UnderlyingCPRegType) = conubia
|
|
60
|
+
[118] 318 (UnderlyingCurrency) = nostra,, [119] 879 (UnderlyingQty) = 0.0006515
|
|
61
|
+
[120] 810 (UnderlyingPx) = -0.0001727, [121] 883 (UnderlyingEndPrice) = 0.011643
|
|
62
|
+
[122] 884 (UnderlyingStartValue) = 12.53, [123] 886 (UnderlyingEndValue) = 88.145
|
|
63
|
+
[124] 887 (NoUnderlyingStips) = 2, [125] 888 (UnderlyingStipType) = per
|
|
64
|
+
[126] 889 (UnderlyingStipValue) = inceptos, [127] 888 (UnderlyingStipType) = himenaeos.
|
|
65
|
+
[128] 889 (UnderlyingStipValue) = Pellentesque, [129] 311 (UnderlyingSymbol) = eu
|
|
66
|
+
[130] 312 (UnderlyingSymbolSfx) = luctus, [131] 309 (UnderlyingSecurityID) = risus,
|
|
67
|
+
[132] 305 (UnderlyingSecurityIDSource) = et, [133] 457 (NoUnderlyingSecurityAltID) = 1
|
|
68
|
+
[134] 458 (UnderlyingSecurityAltID) = tincidunt, [135] 463 (UnderlyingCFICode) = nunc.
|
|
69
|
+
[136] 310 (UnderlyingSecurityType) = Morbi, [137] 763 (UnderlyingSecuritySubType) = tellus
|
|
70
|
+
[138] 313 (UnderlyingMaturityMonthYear) = mi,, [139] 542 (UnderlyingMaturityDate) = 20211227
|
|
71
|
+
[140] 315 (UnderlyingPutOrCall) = 3523, [141] 242 (UnderlyingIssueDate) = 20211227
|
|
72
|
+
[142] 243 (UnderlyingRepoCollateralSecurityType) = feugiat, [143] 244 (UnderlyingRepurchaseTerm) = 94140
|
|
73
|
+
[144] 245 (UnderlyingRepurchaseRate) = 0.048706, [145] 246 (UnderlyingFactor) = 0.082392
|
|
74
|
+
[146] 595 (UnderlyingInstrRegistry) = vel, [147] 593 (UnderlyingStateOrProvinceOfIssue) = dictum
|
|
75
|
+
[148] 594 (UnderlyingLocaleOfIssue) = ac,, [149] 247 (UnderlyingRedemptionDate) = 20211227
|
|
76
|
+
[150] 316 (UnderlyingStrikePrice) = 0.0004474, [151] 941 (UnderlyingStrikeCurrency) = posuere
|
|
77
|
+
[152] 317 (UnderlyingOptAttribute) = non, [153] 436 (UnderlyingContractMultiplier) = 0.11404
|
|
78
|
+
[154] 435 (UnderlyingCouponRate) = 0.0752, [155] 306 (UnderlyingIssuer) = nibh.
|
|
79
|
+
[156] 362 (EncodedUnderlyingIssuerLen) = 67554, [157] 364 (EncodedUnderlyingSecurityDescLen) = 6124
|
|
80
|
+
[158] 877 (UnderlyingCPProgram) = Pellentesque, [159] 878 (UnderlyingCPRegType) = ornare,
|
|
81
|
+
[160] 879 (UnderlyingQty) = -19.382, [161] 810 (UnderlyingPx) = 518.56
|
|
82
|
+
[162] 882 (UnderlyingDirtyPrice) = -0.0009747, [163] 883 (UnderlyingEndPrice) = 0.42528
|
|
83
|
+
[164] 884 (UnderlyingStartValue) = 24.846, [165] 885 (UnderlyingCurrentValue) = -0.0539
|
|
84
|
+
[166] 886 (UnderlyingEndValue) = -6509.3, [167] 887 (NoUnderlyingStips) = 1
|
|
85
|
+
[168] 888 (UnderlyingStipType) = lorem, [169] 889 (UnderlyingStipValue) = semper
|
|
86
|
+
[170] 311 (UnderlyingSymbol) = consequat, [171] 312 (UnderlyingSymbolSfx) = laoreet,
|
|
87
|
+
[172] 309 (UnderlyingSecurityID) = sapien, [173] 305 (UnderlyingSecurityIDSource) = odio
|
|
88
|
+
[174] 457 (NoUnderlyingSecurityAltID) = 1, [175] 458 (UnderlyingSecurityAltID) = tempor
|
|
89
|
+
[176] 462 (UnderlyingProduct) = 64791, [177] 463 (UnderlyingCFICode) = velit,
|
|
90
|
+
[178] 310 (UnderlyingSecurityType) = a, [179] 763 (UnderlyingSecuritySubType) = sollicitudin
|
|
91
|
+
[180] 313 (UnderlyingMaturityMonthYear) = purus, [181] 542 (UnderlyingMaturityDate) = 20211227
|
|
92
|
+
[182] 315 (UnderlyingPutOrCall) = 55547, [183] 241 (UnderlyingCouponPaymentDate) = 20211227
|
|
93
|
+
[184] 243 (UnderlyingRepoCollateralSecurityType) = augue, [185] 244 (UnderlyingRepurchaseTerm) = 29082
|
|
94
|
+
[186] 245 (UnderlyingRepurchaseRate) = 0.018622, [187] 246 (UnderlyingFactor) = -0.0099393
|
|
95
|
+
[188] 256 (UnderlyingCreditRating) = ut, [189] 595 (UnderlyingInstrRegistry) = odio.
|
|
96
|
+
[190] 592 (UnderlyingCountryOfIssue) = Proin, [191] 593 (UnderlyingStateOrProvinceOfIssue) = tempor
|
|
97
|
+
[192] 594 (UnderlyingLocaleOfIssue) = justo, [193] 247 (UnderlyingRedemptionDate) = 20211227
|
|
98
|
+
[194] 317 (UnderlyingOptAttribute) = nisi,, [195] 436 (UnderlyingContractMultiplier) = 719.84
|
|
99
|
+
[196] 435 (UnderlyingCouponRate) = 0.5477, [197] 308 (UnderlyingSecurityExchange) = ut
|
|
100
|
+
[198] 306 (UnderlyingIssuer) = euismod, [199] 362 (EncodedUnderlyingIssuerLen) = 94466
|
|
101
|
+
[200] 307 (UnderlyingSecurityDesc) = nibh, [201] 364 (EncodedUnderlyingSecurityDescLen) = 40167
|
|
102
|
+
[202] 877 (UnderlyingCPProgram) = convallis, [203] 878 (UnderlyingCPRegType) = at.
|
|
103
|
+
[204] 318 (UnderlyingCurrency) = Donec, [205] 879 (UnderlyingQty) = -0.73901
|
|
104
|
+
[206] 882 (UnderlyingDirtyPrice) = 934.11, [207] 883 (UnderlyingEndPrice) = 0.026
|
|
105
|
+
[208] 885 (UnderlyingCurrentValue) = 0.04018, [209] 886 (UnderlyingEndValue) = -0.0008814
|
|
106
|
+
[210] 887 (NoUnderlyingStips) = 2, [211] 888 (UnderlyingStipType) = fermentum
|
|
107
|
+
[212] 889 (UnderlyingStipValue) = erat, [213] 888 (UnderlyingStipType) = risus,
|
|
108
|
+
[214] 822 (UnderlyingTradingSessionID) = vel, [215] 823 (UnderlyingTradingSessionSubID) = placerat
|
|
109
|
+
[216] 32 (LastQty) = -0.0019538, [217] 31 (LastPx) = -0.078948
|
|
110
|
+
[218] 669 (LastParPx) = -0.006833, [219] 194 (LastSpotRate) = -4.468
|
|
111
|
+
[220] 715 (ClearingBusinessDate) = 20211227, [221] 6 (AvgPx) = 9.827
|
|
112
|
+
[222] 218 (Spread) = 4.4614, [223] 220 (BenchmarkCurveCurrency) = nulla
|
|
113
|
+
[224] 221 (BenchmarkCurveName) = luctus, [225] 222 (BenchmarkCurvePoint) = ac.
|
|
114
|
+
[226] 663 (BenchmarkPriceType) = 51942, [227] 699 (BenchmarkSecurityID) = Vivamus
|
|
115
|
+
[228] 761 (BenchmarkSecurityIDSource) = vel, [229] 819 (AvgPxIndicator) = 2[LastTrade]
|
|
116
|
+
[230] 753 (NoPosAmt) = 1, [231] 707 (PosAmtType) = CASH[CashAmount]
|
|
117
|
+
[232] 708 (PosAmt) = -0.64577, [233] 442 (MultiLegReportingType) = 1[SingleSecurity]
|
|
118
|
+
[234] 824 (TradeLegRefID) = mi, [235] 555 (NoLegs) = 2
|
|
119
|
+
[236] 600 (LegSymbol) = eros., [237] 601 (LegSymbolSfx) = Nam
|
|
120
|
+
[238] 602 (LegSecurityID) = arcu, [239] 603 (LegSecurityIDSource) = urna,
|
|
121
|
+
[240] 604 (NoLegSecurityAltID) = 3, [241] 605 (LegSecurityAltID) = rhoncus
|
|
122
|
+
[242] 606 (LegSecurityAltIDSource) = sit, [243] 605 (LegSecurityAltID) = amet
|
|
123
|
+
[244] 606 (LegSecurityAltIDSource) = bibendum, [245] 605 (LegSecurityAltID) = sit
|
|
124
|
+
[246] 608 (LegCFICode) = amet,, [247] 609 (LegSecurityType) = eleifend
|
|
125
|
+
[248] 764 (LegSecuritySubType) = non, [249] 610 (LegMaturityMonthYear) = massa.
|
|
126
|
+
[250] 611 (LegMaturityDate) = 20211227, [251] 248 (LegCouponPaymentDate) = 20211227
|
|
127
|
+
[252] 249 (LegIssueDate) = 20211227, [253] 250 (LegRepoCollateralSecurityType) = Nam
|
|
128
|
+
[254] 251 (LegRepurchaseTerm) = 17316, [255] 253 (LegFactor) = -0.07926
|
|
129
|
+
[256] 257 (LegCreditRating) = metus, [257] 597 (LegStateOrProvinceOfIssue) = mi,
|
|
130
|
+
[258] 598 (LegLocaleOfIssue) = maximus, [259] 612 (LegStrikePrice) = -1.1535
|
|
131
|
+
[260] 942 (LegStrikeCurrency) = et, [261] 614 (LegContractMultiplier) = -7.3717
|
|
132
|
+
[262] 615 (LegCouponRate) = 0.0004804, [263] 616 (LegSecurityExchange) = facilisis
|
|
133
|
+
[264] 617 (LegIssuer) = in,, [265] 621 (EncodedLegSecurityDescLen) = 82498
|
|
134
|
+
[266] 624 (LegSide) = ornare, [267] 556 (LegCurrency) = sed
|
|
135
|
+
[268] 739 (LegDatedDate) = 20211227, [269] 955 (LegContractSettlMonth) = magna.
|
|
136
|
+
[270] 956 (LegInterestAccrualDate) = 20211227, [271] 687 (LegQty) = -0.000424
|
|
137
|
+
[272] 683 (NoLegStipulations) = 1, [273] 688 (LegStipulationType) = Nulla
|
|
138
|
+
[274] 689 (LegStipulationValue) = non, [275] 564 (LegPositionEffect) = leo
|
|
139
|
+
[276] 565 (LegCoveredOrUncovered) = 34942, [277] 539 (NoNestedPartyIDs) = 3
|
|
140
|
+
[278] 524 (NestedPartyID) = at, [279] 525 (NestedPartyIDSource) = odio
|
|
141
|
+
[280] 538 (NestedPartyRole) = 99446, [281] 804 (NoNestedPartySubIDs) = 3
|
|
142
|
+
[282] 545 (NestedPartySubID) = hendrerit, [283] 805 (NestedPartySubIDType) = 56692
|
|
143
|
+
[284] 545 (NestedPartySubID) = placerat., [285] 805 (NestedPartySubIDType) = 67960
|
|
144
|
+
[286] 545 (NestedPartySubID) = Pellentesque, [287] 805 (NestedPartySubIDType) = 54921
|
|
145
|
+
[288] 524 (NestedPartyID) = felis, [289] 525 (NestedPartyIDSource) = arcu,
|
|
146
|
+
[290] 804 (NoNestedPartySubIDs) = 2, [291] 545 (NestedPartySubID) = elementum
|
|
147
|
+
[292] 805 (NestedPartySubIDType) = 1367, [293] 545 (NestedPartySubID) = eu
|
|
148
|
+
[294] 805 (NestedPartySubIDType) = 53286, [295] 524 (NestedPartyID) = mollis
|
|
149
|
+
[296] 538 (NestedPartyRole) = 53107, [297] 804 (NoNestedPartySubIDs) = 1
|
|
150
|
+
[298] 545 (NestedPartySubID) = vitae,, [299] 805 (NestedPartySubIDType) = 12864
|
|
151
|
+
[300] 654 (LegRefID) = euismod, [301] 566 (LegPrice) = -770.02
|
|
152
|
+
[302] 587 (LegSettlType) = ut, [303] 588 (LegSettlDate) = 20211227
|
|
153
|
+
[304] 637 (LegLastPx) = -164.81, [305] 600 (LegSymbol) = diam.
|
|
154
|
+
[306] 602 (LegSecurityID) = Aliquam, [307] 603 (LegSecurityIDSource) = porttitor
|
|
155
|
+
[308] 604 (NoLegSecurityAltID) = 2, [309] 605 (LegSecurityAltID) = erat
|
|
156
|
+
[310] 606 (LegSecurityAltIDSource) = eget, [311] 605 (LegSecurityAltID) = tellus
|
|
157
|
+
[312] 606 (LegSecurityAltIDSource) = cursus,, [313] 607 (LegProduct) = 75829
|
|
158
|
+
[314] 608 (LegCFICode) = in, [315] 764 (LegSecuritySubType) = hendrerit
|
|
159
|
+
[316] 610 (LegMaturityMonthYear) = nisi, [317] 611 (LegMaturityDate) = 20211227
|
|
160
|
+
[318] 248 (LegCouponPaymentDate) = 20211227, [319] 250 (LegRepoCollateralSecurityType) = tempus.
|
|
161
|
+
[320] 251 (LegRepurchaseTerm) = 3329, [321] 252 (LegRepurchaseRate) = -277.56
|
|
162
|
+
[322] 253 (LegFactor) = -18.8, [323] 257 (LegCreditRating) = Interdum
|
|
163
|
+
[324] 599 (LegInstrRegistry) = et, [325] 596 (LegCountryOfIssue) = malesuada
|
|
164
|
+
[326] 597 (LegStateOrProvinceOfIssue) = fames, [327] 598 (LegLocaleOfIssue) = ac
|
|
165
|
+
[328] 254 (LegRedemptionDate) = 20211227, [329] 612 (LegStrikePrice) = -7816.2
|
|
166
|
+
[330] 942 (LegStrikeCurrency) = ante, [331] 613 (LegOptAttribute) = ipsum
|
|
167
|
+
[332] 614 (LegContractMultiplier) = 416.66, [333] 617 (LegIssuer) = primis
|
|
168
|
+
[334] 620 (LegSecurityDesc) = in, [335] 621 (EncodedLegSecurityDescLen) = 15061
|
|
169
|
+
[336] 623 (LegRatioQty) = 0.0027833, [337] 624 (LegSide) = faucibus.
|
|
170
|
+
[338] 556 (LegCurrency) = Ut, [339] 740 (LegPool) = egestas
|
|
171
|
+
[340] 739 (LegDatedDate) = 20211227, [341] 955 (LegContractSettlMonth) = massa
|
|
172
|
+
[342] 956 (LegInterestAccrualDate) = 20211227, [343] 687 (LegQty) = -0.0006061
|
|
173
|
+
[344] 690 (LegSwapType) = 1[ParForPar], [345] 683 (NoLegStipulations) = 1
|
|
174
|
+
[346] 688 (LegStipulationType) = ac, [347] 564 (LegPositionEffect) = cursus
|
|
175
|
+
[348] 565 (LegCoveredOrUncovered) = 36419, [349] 539 (NoNestedPartyIDs) = 1
|
|
176
|
+
[350] 524 (NestedPartyID) = semper., [351] 525 (NestedPartyIDSource) = Vivamus
|
|
177
|
+
[352] 804 (NoNestedPartySubIDs) = 2, [353] 545 (NestedPartySubID) = rhoncus
|
|
178
|
+
[354] 805 (NestedPartySubIDType) = 5487, [355] 545 (NestedPartySubID) = convallis
|
|
179
|
+
[356] 805 (NestedPartySubIDType) = 10644, [357] 654 (LegRefID) = nulla,
|
|
180
|
+
[358] 566 (LegPrice) = 8887.6, [359] 587 (LegSettlType) = nec
|
|
181
|
+
[360] 637 (LegLastPx) = 75.646, [361] 768 (NoTrdRegTimestamps) = 1
|
|
182
|
+
[362] 769 (TrdRegTimestamp) = 20211227-14:01:51.000, [363] 770 (TrdRegTimestampType) = 1[ExecutionTime]
|
|
183
|
+
[364] 771 (TrdRegTimestampOrigin) = ornare, [365] 64 (SettlDate) = 20211227
|
|
184
|
+
[366] 573 (MatchStatus) = 2[AdvisoryOrAlert], [367] 574 (MatchType) = M4[ActDefaultTrade]
|
|
185
|
+
[368] 552 (NoSides) = 1[OneSide], [369] 54 (Side) = B[AsDefined]
|
|
186
|
+
[370] 11 (ClOrdID) = urna, [371] 66 (ListID) = iaculis
|
|
187
|
+
[372] 453 (NoPartyIDs) = 1, [373] 448 (PartyID) = vitae.
|
|
188
|
+
[374] 447 (PartyIDSource) = C[GeneralIdentifier], [375] 452 (PartyRole) = 36[EnteringTrader]
|
|
189
|
+
[376] 802 (NoPartySubIDs) = 1, [377] 523 (PartySubID) = Aliquam
|
|
190
|
+
[378] 803 (PartySubIDType) = 16[Bic], [379] 1 (Account) = erat
|
|
191
|
+
[380] 660 (AcctIDSource) = 5[DtccCode], [381] 581 (AccountType) = 4[FloorTrader]
|
|
192
|
+
[382] 81 (ProcessCode) = 1[SoftDollar], [383] 576 (NoClearingInstructions) = 1
|
|
193
|
+
[384] 577 (ClearingInstruction) = 12[CustomerTrade], [385] 579 (TradeInputDevice) = volutpat.
|
|
194
|
+
[386] 15 (Currency) = In, [387] 376 (ComplianceID) = condimentum
|
|
195
|
+
[388] 529 (OrderRestrictions) = 1[ProgramTrade], [389] 582 (CustOrderCapacity) = 3[MemberTradingForAnotherMember]
|
|
196
|
+
[390] 40 (OrdType) = 8[LimitWithOrWithout], [391] 18 (ExecInst) = K[CancelOnTradingHalt]
|
|
197
|
+
[392] 336 (TradingSessionID) = feugiat, [393] 625 (TradingSessionSubID) = sem
|
|
198
|
+
[394] 943 (TimeBracket) = ut, [395] 12 (Commission) = -0.041751
|
|
199
|
+
[396] 13 (CommType) = 5[PercentageWaivedEnhancedUnits], [397] 479 (CommCurrency) = porttitor.
|
|
200
|
+
[398] 497 (FundRenewWaiv) = Y[Yes], [399] 230 (ExDate) = 20211227
|
|
201
|
+
[400] 159 (AccruedInterestAmt) = 0.17864, [401] 738 (InterestAtMaturity) = 0.0013132
|
|
202
|
+
[402] 920 (EndAccruedInterestAmt) = -120.39, [403] 921 (StartCash) = -0.046515
|
|
203
|
+
[404] 922 (EndCash) = -0.5049, [405] 238 (Concession) = 0.018766
|
|
204
|
+
[406] 237 (TotalTakedown) = 0.078006, [407] 118 (NetMoney) = 43.944
|
|
205
|
+
[408] 119 (SettlCurrAmt) = 0.0050687, [409] 120 (SettlCurrency) = Quisque
|
|
206
|
+
[410] 155 (SettlCurrFxRate) = -119.23, [411] 156 (SettlCurrFxRateCalc) = D[Divide]
|
|
207
|
+
[412] 77 (PositionEffect) = R[Rolled], [413] 58 (Text) = pellentesque
|
|
208
|
+
[414] 752 (SideMultiLegReportingType) = 1[SingleSecurity], [415] 518 (NoContAmts) = 1
|
|
209
|
+
[416] 519 (ContAmtType) = 14[FundBasedRenewalCommissionOnFund], [417] 520 (ContAmtValue) = 6883.9
|
|
210
|
+
[418] 521 (ContAmtCurr) = tortor, [419] 232 (NoStipulations) = 3
|
|
211
|
+
[420] 233 (StipulationType) = MINQTY[MinimumQuantity], [421] 234 (StipulationValue) = eget
|
|
212
|
+
[422] 233 (StipulationType) = PMAX[PoolsMaximum], [423] 234 (StipulationValue) = est
|
|
213
|
+
[424] 233 (StipulationType) = PROD[ProductionYear], [425] 136 (NoMiscFees) = 1
|
|
214
|
+
[426] 137 (MiscFeeAmt) = 27.84, [427] 891 (MiscFeeBasis) = 1[PerUnit]
|
|
215
|
+
[428] 825 (ExchangeRule) = tincidunt, [429] 826 (TradeAllocIndicator) = 2[UseAllocationProvidedWithTheTrade]
|
|
216
|
+
[430] 70 (AllocID) = Lorem, [431] 78 (NoAllocs) = 2
|
|
217
|
+
[432] 79 (AllocAccount) = ipsum, [433] 661 (AllocAcctIDSource) = 49642
|
|
218
|
+
[434] 467 (IndividualAllocID) = dolor, [435] 756 (NoNested2PartyIDs) = 3
|
|
219
|
+
[436] 757 (Nested2PartyID) = sit, [437] 759 (Nested2PartyRole) = 99017
|
|
220
|
+
[438] 806 (NoNested2PartySubIDs) = 3, [439] 760 (Nested2PartySubID) = amet,
|
|
221
|
+
[440] 807 (Nested2PartySubIDType) = 209, [441] 760 (Nested2PartySubID) = consectetur
|
|
222
|
+
[442] 760 (Nested2PartySubID) = adipiscing, [443] 807 (Nested2PartySubIDType) = 25708
|
|
223
|
+
[444] 757 (Nested2PartyID) = elit., [445] 758 (Nested2PartyIDSource) = Nunc
|
|
224
|
+
[446] 759 (Nested2PartyRole) = 6005, [447] 806 (NoNested2PartySubIDs) = 3
|
|
225
|
+
[448] 760 (Nested2PartySubID) = odio, [449] 807 (Nested2PartySubIDType) = 52234
|
|
226
|
+
[450] 760 (Nested2PartySubID) = orci,, [451] 807 (Nested2PartySubIDType) = 21855
|
|
227
|
+
[452] 760 (Nested2PartySubID) = blandit, [453] 807 (Nested2PartySubIDType) = 60040
|
|
228
|
+
[454] 757 (Nested2PartyID) = vel, [455] 758 (Nested2PartyIDSource) = semper
|
|
229
|
+
[456] 806 (NoNested2PartySubIDs) = 3, [457] 760 (Nested2PartySubID) = sed,
|
|
230
|
+
[458] 807 (Nested2PartySubIDType) = 57098, [459] 760 (Nested2PartySubID) = bibendum
|
|
231
|
+
[460] 807 (Nested2PartySubIDType) = 26711, [461] 760 (Nested2PartySubID) = cursus
|
|
232
|
+
[462] 80 (AllocQty) = 8958.7, [463] 79 (AllocAccount) = lectus.
|
|
233
|
+
[464] 661 (AllocAcctIDSource) = 97104, [465] 756 (NoNested2PartyIDs) = 3
|
|
234
|
+
[466] 757 (Nested2PartyID) = Aenean, [467] 758 (Nested2PartyIDSource) = vel
|
|
235
|
+
[468] 759 (Nested2PartyRole) = 56444, [469] 806 (NoNested2PartySubIDs) = 3
|
|
236
|
+
[470] 760 (Nested2PartySubID) = diam, [471] 807 (Nested2PartySubIDType) = 430
|
|
237
|
+
[472] 760 (Nested2PartySubID) = magna., [473] 807 (Nested2PartySubIDType) = 58029
|
|
238
|
+
[474] 760 (Nested2PartySubID) = Aenean, [475] 807 (Nested2PartySubIDType) = 79888
|
|
239
|
+
[476] 757 (Nested2PartyID) = et, [477] 758 (Nested2PartyIDSource) = viverra
|
|
240
|
+
[478] 759 (Nested2PartyRole) = 37017, [479] 806 (NoNested2PartySubIDs) = 1
|
|
241
|
+
[480] 760 (Nested2PartySubID) = leo,, [481] 807 (Nested2PartySubIDType) = 56444
|
|
242
|
+
[482] 757 (Nested2PartyID) = non, [483] 758 (Nested2PartyIDSource) = iaculis
|
|
243
|
+
[484] 759 (Nested2PartyRole) = 76525, [485] 806 (NoNested2PartySubIDs) = 3
|
|
244
|
+
[486] 760 (Nested2PartySubID) = neque., [487] 807 (Nested2PartySubIDType) = 85781
|
|
245
|
+
[488] 760 (Nested2PartySubID) = Nullam, [489] 807 (Nested2PartySubIDType) = 20498
|
|
246
|
+
[490] 760 (Nested2PartySubID) = arcu, [491] 807 (Nested2PartySubIDType) = 903
|
|
247
|
+
[492] 80 (AllocQty) = -0.99254, [493] 852 (PublishTrdIndicator) = Y[ReportTrade]
|
|
248
|
+
[494] 853 (ShortSaleReason) = 4[QualifiedServiceRepresentative], [495] 10 (CheckSum) = 163
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { IJsFixConfig } from '../config';
|
|
3
|
+
import * as events from 'events';
|
|
4
|
+
export declare abstract class FixEntity extends events.EventEmitter {
|
|
5
|
+
readonly config: IJsFixConfig;
|
|
6
|
+
abstract start(): Promise<any>;
|
|
7
|
+
constructor(config: IJsFixConfig);
|
|
8
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FixEntity = void 0;
|
|
4
|
+
const events = require("events");
|
|
5
|
+
class FixEntity extends events.EventEmitter {
|
|
6
|
+
constructor(config) {
|
|
7
|
+
super();
|
|
8
|
+
this.config = config;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.FixEntity = FixEntity;
|
|
12
|
+
//# sourceMappingURL=FixEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FixEntity.js","sourceRoot":"","sources":["../../src/transport/FixEntity.ts"],"names":[],"mappings":";;;AACA,iCAAgC;AAEhC,MAAsB,SAAU,SAAQ,MAAM,CAAC,YAAY;IAEzD,YAA6B,MAAoB;QAC/C,KAAK,EAAE,CAAA;QADoB,WAAM,GAAN,MAAM,CAAc;IAEjD,CAAC;CACF;AALD,8BAKC","sourcesContent":["import { IJsFixConfig } from '../config'\r\nimport * as events from 'events'\r\n\r\nexport abstract class FixEntity extends events.EventEmitter {\r\n abstract start (): Promise<any>\r\n constructor (public readonly config: IJsFixConfig) {\r\n super()\r\n }\r\n}\r\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ISessionMsgFactory } from './
|
|
2
|
-
import { ISessionDescription } from './session-description';
|
|
1
|
+
import { ISessionMsgFactory } from './session/session-msg-factory';
|
|
2
|
+
import { ISessionDescription } from './session/session-description';
|
|
3
3
|
import { ILooseObject } from '../collections/collection';
|
|
4
4
|
import { IStandardHeader } from '../types/FIX4.4/repo';
|
|
5
5
|
export interface ObjectMutator {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a-session-msg-factory.js","sourceRoot":"","sources":["../../src/transport/a-session-msg-factory.ts"],"names":[],"mappings":";;;AAGA,oCAAkC;AAelC,MAAsB,kBAAkB;IAEtC,YAA6B,WAAgC,EAAS,UAAyB,IAAI;QAAtE,gBAAW,GAAX,WAAW,CAAqB;QAAS,YAAO,GAAP,OAAO,CAAsB;IACnG,CAAC;IAEM,MAAM,CAAE,OAAe,EAAE,KAAa,EAAE,GAAW,EAAE,MAAc;QACxE,MAAM,CAAC,GAAY;YACjB,UAAU,EAAE,OAAO;YACnB,mBAAmB,EAAE,MAAM;YAC3B,SAAS,EAAE,KAAK;YAChB,IAAI,EAAE,GAAG;SACC,CAAA;QACZ,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,eAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAC7E,CAAC;IAOS,MAAM,CAAE,CAAe,EAAE,IAAY;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IACnE,CAAC;IAEM,WAAW,CAAE,QAAgB,QAAQ,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE;QACpE,MAAM,CAAC,GAAiB;YACtB,SAAS,EAAE,KAAK;SACD,CAAA;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,eAAO,CAAC,WAAW,CAAC,CAAA;IAC5C,CAAC;IAEM,SAAS,CAAE,SAAiB;QACjC,MAAM,CAAC,GAAe;YACpB,SAAS,EAAE,SAAS;SACP,CAAA;QACf,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,eAAO,CAAC,SAAS,CAAC,CAAA;IAC1C,CAAC;IAEM,aAAa,CAAE,IAAY,EAAE,EAAU;QAC5C,MAAM,CAAC,GAAmB;YACxB,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,EAAE;SACK,CAAA;QACnB,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,eAAO,CAAC,aAAa,CAAC,CAAA;IAC9C,CAAC;IAEM,aAAa,CAAE,QAAgB,EAAE,OAAiB;QACvD,MAAM,CAAC,GAAmB;YACxB,WAAW,EAAE,OAAO,KAAK,IAAI;YAC7B,QAAQ,EAAE,QAAQ;SACD,CAAA;QACnB,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,eAAO,CAAC,aAAa,CAAC,CAAA;IAC9C,CAAC;IAEM,OAAO,CAAE,QAAgB;QAC9B,MAAM,CAAC,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAA;QAC7B,MAAM,MAAM,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;QACjC,MAAM,CAAC,GAAG;YACR,QAAQ,EAAE,MAAM;SACG,CAAA;QACrB,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAA;IAC1C,CAAC;CACF;AA9DD,gDA8DC","sourcesContent":["import { ISessionMsgFactory } from './
|
|
1
|
+
{"version":3,"file":"a-session-msg-factory.js","sourceRoot":"","sources":["../../src/transport/a-session-msg-factory.ts"],"names":[],"mappings":";;;AAGA,oCAAkC;AAelC,MAAsB,kBAAkB;IAEtC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AM,CAAC,CAAC,EAAE,eAAO,CAAC,aAAa,CAAC,CAAA;IAC9C,CAAC;IAEM,aAAa,CAAE,QAAgB,EAAE,OAAiB;QACvD,MAAM,CAAC,GAAmB;YACxB,WAAW,EAAE,OAAO,KAAK,IAAI;YAC7B,QAAQ,EAAE,QAAQ;SACD,CAAA;QACnB,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,eAAO,CAAC,aAAa,CAAC,CAAA;IAC9C,CAAC;IAEM,OAAO,CAAE,QAAgB;QAC9B,MAAM,CAAC,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAA;QAC7B,MAAM,MAAM,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;QACjC,MAAM,CAAC,GAAG;YACR,QAAQ,EAAE,MAAM;SACG,CAAA;QACrB,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAA;IAC1C,CAAC;CACF;AA9DD,gDA8DC","sourcesContent":["import { ISessionMsgFactory } from './session/session-msg-factory'\r\nimport { ISessionDescription } from './session/session-description'\r\nimport { ILooseObject } from '../collections/collection'\r\nimport { MsgType } from '../types'\r\n\r\nimport {\r\n IHeartbeat,\r\n IReject,\r\n IResendRequest,\r\n ISequenceReset,\r\n IStandardHeader,\r\n IStandardTrailer,\r\n ITestRequest\r\n} from '../types/FIX4.4/repo'\r\n\r\nexport interface ObjectMutator { (description: ISessionDescription, type: string, o: ILooseObject): ILooseObject\r\n}\r\n\r\nexport abstract class ASessionMsgFactory implements ISessionMsgFactory {\r\n public isAscii: boolean\r\n constructor (public readonly description: ISessionDescription, public mutator: ObjectMutator = null) {\r\n }\r\n\r\n public reject (msgType: string, seqNo: number, msg: string, reason: number): ILooseObject {\r\n const o: IReject = {\r\n RefMsgType: msgType,\r\n SessionRejectReason: reason,\r\n RefSeqNum: seqNo,\r\n Text: msg\r\n } as IReject\r\n return this.mutator ? this.mutator(this.description, MsgType.Reject, o) : o\r\n }\r\n\r\n // see implementations Ascii and Fixml\r\n public abstract logon (userRequestId: string, isResponse: boolean): ILooseObject\r\n public abstract logout (msgType: string, text: string): ILooseObject\r\n public abstract header (msgType: string, seqNum: number, time: Date, overrideData?: Partial<IStandardHeader>): ILooseObject\r\n\r\n protected mutate (o: ILooseObject, type: string): ILooseObject {\r\n return this.mutator ? this.mutator(this.description, type, o) : o\r\n }\r\n\r\n public testRequest (reqId: string = `ping-${new Date().toUTCString()}`): ILooseObject {\r\n const o: ITestRequest = {\r\n TestReqID: reqId\r\n } as ITestRequest\r\n return this.mutate(o, MsgType.TestRequest)\r\n }\r\n\r\n public heartbeat (testReqId: string): ILooseObject {\r\n const o: IHeartbeat = {\r\n TestReqID: testReqId\r\n } as IHeartbeat\r\n return this.mutate(o, MsgType.Heartbeat)\r\n }\r\n\r\n public resendRequest (from: number, to: number): ILooseObject {\r\n const o: IResendRequest = {\r\n BeginSeqNo: from,\r\n EndSeqNo: to\r\n } as IResendRequest\r\n return this.mutate(o, MsgType.ResendRequest)\r\n }\r\n\r\n public sequenceReset (newSeqNo: number, gapFill?: boolean): ILooseObject {\r\n const o: ISequenceReset = {\r\n GapFillFlag: gapFill === true,\r\n NewSeqNo: newSeqNo\r\n } as ISequenceReset\r\n return this.mutate(o, MsgType.SequenceReset)\r\n }\r\n\r\n public trailer (checksum: number): ILooseObject {\r\n const s = checksum.toString()\r\n const padded = s.padStart(3, '0')\r\n const o = {\r\n CheckSum: padded\r\n } as IStandardTrailer\r\n return this.mutate(o, 'StandardTrailer')\r\n }\r\n}\r\n"]}
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
2
14
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
15
|
var t = {};
|
|
4
16
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -12,16 +24,18 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
24
|
};
|
|
13
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
26
|
exports.AsciiMsgTransmitter = void 0;
|
|
15
|
-
const
|
|
27
|
+
const ascii_1 = require("../../buffer/ascii");
|
|
16
28
|
const msg_transmitter_1 = require("../msg-transmitter");
|
|
17
|
-
|
|
29
|
+
const tsyringe_1 = require("tsyringe");
|
|
30
|
+
const di_tokens_1 = require("../../runtime/di-tokens");
|
|
31
|
+
let AsciiMsgTransmitter = class AsciiMsgTransmitter extends msg_transmitter_1.MsgTransmitter {
|
|
18
32
|
constructor(config) {
|
|
19
|
-
super(config.definitions, config.description);
|
|
33
|
+
super(config.sessionContainer.resolve(di_tokens_1.DITokens.TransmitBuffer), config.definitions, config.description);
|
|
20
34
|
this.config = config;
|
|
21
35
|
this.msgSeqNum = (config.description.LastSentSeqNum || 0) + 1;
|
|
22
36
|
const buffer = this.buffer;
|
|
23
|
-
const tf = new
|
|
24
|
-
this.encoder = new
|
|
37
|
+
const tf = new ascii_1.TimeFormatter(buffer);
|
|
38
|
+
this.encoder = new ascii_1.AsciiEncoder(buffer, config.definitions, tf, config.delimiter || ascii_1.AsciiChars.Soh, config.logDelimiter || ascii_1.AsciiChars.Pipe);
|
|
25
39
|
const components = config.definitions.component;
|
|
26
40
|
this.header = components.get('StandardHeader');
|
|
27
41
|
this.trailer = components.get('StandardTrailer');
|
|
@@ -70,6 +84,11 @@ class AsciiMsgTransmitter extends msg_transmitter_1.MsgTransmitter {
|
|
|
70
84
|
const trl = factory.trailer(checksum);
|
|
71
85
|
encoder.encode(trl, this.trailer.name);
|
|
72
86
|
}
|
|
73
|
-
}
|
|
87
|
+
};
|
|
88
|
+
AsciiMsgTransmitter = __decorate([
|
|
89
|
+
(0, tsyringe_1.injectable)(),
|
|
90
|
+
__param(0, (0, tsyringe_1.inject)(di_tokens_1.DITokens.IJsFixConfig)),
|
|
91
|
+
__metadata("design:paramtypes", [Object])
|
|
92
|
+
], AsciiMsgTransmitter);
|
|
74
93
|
exports.AsciiMsgTransmitter = AsciiMsgTransmitter;
|
|
75
94
|
//# sourceMappingURL=ascii-msg-transmitter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ascii-msg-transmitter.js","sourceRoot":"","sources":["../../../src/transport/ascii/ascii-msg-transmitter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ascii-msg-transmitter.js","sourceRoot":"","sources":["../../../src/transport/ascii/ascii-msg-transmitter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAA4E;AAC5E,wDAAmD;AAMnD,uCAA6C;AAC7C,uDAAkD;AAIlD,IAAa,mBAAmB,GAAhC,MAAa,mBAAoB,SAAQ,gCAAc;IAOrD,YAA4D,MAAoB;QAC9E,KAAK,CAAC,MAAM,CAAC,gBAAgB,CAAC,OAAO,CAAgB,oBAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,CAAA;QAD5D,WAAM,GAAN,MAAM,CAAc;QAE9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AA;QACpC,MAAM,UAAU,GAAW,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,eAAe,IAAI,CAAC,CAAC,CAAA;QACpF,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,CAAA;QAChD,MAAM,CAAC,sBAAsB,CAAC,MAAM,EAAE,GAAG,EAAE,UAAU,CAAC,CAAA;QACtD,IAAI,QAAQ,GAAW,IAAI,CAAC,QAAQ,EAAE,CAAA;QACtC,MAAM,GAAG,GAAiB,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;QACnD,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IACxC,CAAC;CACF,CAAA;AArEY,mBAAmB;IAD/B,IAAA,qBAAU,GAAE;IAQG,WAAA,IAAA,iBAAM,EAAC,oBAAQ,CAAC,YAAY,CAAC,CAAA;;GAPhC,mBAAmB,CAqE/B;AArEY,kDAAmB","sourcesContent":["import { AsciiChars, AsciiEncoder, TimeFormatter } from '../../buffer/ascii'\r\nimport { MsgTransmitter } from '../msg-transmitter'\r\nimport { ILooseObject } from '../../collections/collection'\r\nimport { ContainedFieldSet } from '../../dictionary/contained'\r\nimport { MessageDefinition } from '../../dictionary/definition'\r\nimport { IJsFixConfig } from '../../config'\r\nimport { IStandardHeader } from '../../types/FIX4.4/repo'\r\nimport { inject, injectable } from 'tsyringe'\r\nimport { DITokens } from '../../runtime/di-tokens'\r\nimport { ElasticBuffer } from '../../buffer'\r\n\r\n@injectable()\r\nexport class AsciiMsgTransmitter extends MsgTransmitter {\r\n public msgSeqNum: number\r\n public time: Date\r\n\r\n private readonly header: ContainedFieldSet\r\n private readonly trailer: ContainedFieldSet\r\n\r\n constructor (@inject(DITokens.IJsFixConfig) public readonly config: IJsFixConfig) {\r\n super(config.sessionContainer.resolve<ElasticBuffer>(DITokens.TransmitBuffer), config.definitions, config.description)\r\n this.msgSeqNum = (config.description.LastSentSeqNum || 0) + 1 // adding 1 as this the next sequence # to use.\r\n const buffer = this.buffer\r\n const tf: TimeFormatter = new TimeFormatter(buffer)\r\n this.encoder = new AsciiEncoder(buffer, config.definitions, tf,\r\n config.delimiter || AsciiChars.Soh,\r\n config.logDelimiter || AsciiChars.Pipe)\r\n const components = config.definitions.component\r\n this.header = components.get('StandardHeader')\r\n this.trailer = components.get('StandardTrailer')\r\n }\r\n\r\n private checksum (): number {\r\n const buffer = this.buffer\r\n const encoder: AsciiEncoder = this.encoder as AsciiEncoder\r\n let checksum: number = buffer.sum()\r\n if (encoder.delimiter !== encoder.logDelimiter) {\r\n const changes = encoder.tags.nextTagPos\r\n checksum -= changes * encoder.logDelimiter\r\n checksum += changes * encoder.delimiter\r\n }\r\n checksum = checksum % 256\r\n return checksum\r\n }\r\n\r\n public encodeMessage (msgType: string, obj: ILooseObject): void {\r\n const encoder: AsciiEncoder = this.encoder as AsciiEncoder\r\n const factory = this.config.factory\r\n let headerProps: Partial<IStandardHeader> = {}\r\n const { StandardHeader, ...bodyProps } = obj\r\n if (StandardHeader) {\r\n const { BeginString, BodyLength, MsgType, SenderCompID, SendingTime, TargetCompID, TargetSubID, ...hp } = StandardHeader\r\n headerProps = hp // pick up any optional applied by application\r\n headerProps.OrigSendingTime = SendingTime // when first sent\r\n }\r\n\r\n const sendingTime = this.time || new Date()\r\n const hdr: ILooseObject = factory.header(msgType, this.msgSeqNum, sendingTime, headerProps)\r\n\r\n // Only increment sequence number if this is not a duplicate message.\r\n if (!headerProps.PossDupFlag) {\r\n this.msgSeqNum++\r\n }\r\n\r\n const buffer = this.buffer\r\n buffer.reset()\r\n const msgDef: MessageDefinition = this.definitions.message.get(msgType)\r\n if (!msgDef) {\r\n this.emit('error', new Error(`ascii transmitter cannot find definition for ${msgType}`))\r\n return\r\n }\r\n encoder.encode(hdr, this.header.name)\r\n encoder.encode(bodyProps, msgDef.name)\r\n const lenPos = encoder.bodyLengthPos\r\n const bodyLength: number = Math.max(4, this.config.description.BodyLengthChars || 7)\r\n const len = buffer.getPos() - encoder.msgTypePos\r\n buffer.patchPaddedNumberAtPos(lenPos, len, bodyLength)\r\n let checksum: number = this.checksum()\r\n const trl: ILooseObject = factory.trailer(checksum)\r\n encoder.encode(trl, this.trailer.name)\r\n }\r\n}\r\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ISessionDescription } from '../session-description';
|
|
1
|
+
import { ISessionDescription } from '../session/session-description';
|
|
2
2
|
import { ILooseObject } from '../../collections/collection';
|
|
3
|
-
import { ASessionMsgFactory, ObjectMutator } from '../a-session-msg-factory';
|
|
3
|
+
import { ASessionMsgFactory, ObjectMutator } from '../session/a-session-msg-factory';
|
|
4
4
|
import { IStandardHeader } from '../../types/FIX4.4/repo';
|
|
5
5
|
export declare class AsciiSessionMsgFactory extends ASessionMsgFactory {
|
|
6
6
|
readonly description: ISessionDescription;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SessionMsgFactory = exports.AsciiSessionMsgFactory = void 0;
|
|
4
4
|
const types_1 = require("../../types");
|
|
5
|
-
const a_session_msg_factory_1 = require("../a-session-msg-factory");
|
|
5
|
+
const a_session_msg_factory_1 = require("../session/a-session-msg-factory");
|
|
6
6
|
const repo_1 = require("../../types/FIX4.4/repo");
|
|
7
7
|
class AsciiSessionMsgFactory extends a_session_msg_factory_1.ASessionMsgFactory {
|
|
8
8
|
constructor(description, mutator = null) {
|