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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-store.test.js","sourceRoot":"","sources":["../../src/test/memory-store.test.ts"],"names":[],"mappings":";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CAAA;IACnC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;AACtD,CAAC,CAAA,CAAC,CAAA","sourcesContent":["import 'reflect-metadata'\r\n\r\nimport * as path from 'path'\r\nimport { FixDefinitions } from '../dictionary/definition'\r\nimport { MsgView } from '../buffer'\r\nimport { AsciiView } from '../buffer/ascii'\r\nimport { ILooseObject } from '../collections/collection'\r\nimport { DefinitionFactory, FileReplayer } from '../util'\r\nimport { FixMsgMemoryStore, FixMsgStoreRecord, IFixMsgStore } from '../store'\r\nimport { MsgTag } from '../types'\r\nimport { Setup } from './env/setup'\r\n\r\nconst root: string = path.join(__dirname, '../../data')\r\n\r\nlet definitions: FixDefinitions\r\nlet views: MsgView[]\r\nlet expected: ILooseObject\r\nlet store: IFixMsgStore\r\nlet records: FixMsgStoreRecord[]\r\nlet setup: Setup = null\r\n\r\nbeforeAll(async () => {\r\n setup = new Setup('session/test-initiator.json','session/test-acceptor.json')\r\n await setup.init()\r\n definitions = setup.serverConfig.definitions\r\n expected = require(path.join(root, 'examples/FIX.4.4/fix.json'))\r\n const sessionDescription = setup.clientDescription\r\n definitions = await new DefinitionFactory().getDefinitions(sessionDescription.application.dictionary)\r\n views = await setup.client.replayer.replayFixFile(path.join(root, 'examples/FIX.4.4/jsfix.test_client.txt'))\r\n store = new FixMsgMemoryStore('test', setup.clientConfig)\r\n records = views.reduce((agg: FixMsgStoreRecord[], v: AsciiView) => {\r\n if (v.getString(MsgTag.SenderCompID) === 'accept-tls-comp') {\r\n agg.push(FixMsgStoreRecord.toMsgStoreRecord(v))\r\n }\r\n return agg\r\n }, [])\r\n const toWrite = records.map(r => store.put(r))\r\n await Promise.all(toWrite)\r\n}, 45000)\r\n\r\ntest('expect 15 messages in log', () => {\r\n expect(views.length).toEqual(15)\r\n})\r\n\r\n/*\r\n8=FIX4.4|9=000112|35=AQ|49=accept-tls-comp|56=init-tls-comp|34=2|57=fix|52=20210307-16:16:44.429|568=all-trades|569=0|749=0|750=0|10=142|\r\n8=FIX4.4|9=000209|35=AE|49=accept-tls-comp|56=init-tls-comp|34=3|57=fix|52=20210307-16:16:44.430|571=100000|487=0|856=0|828=0|17=600000|39=2|570=N|55=Platinum|48=Platinum.INC|32=172|31=7.36|75=20210307|60=20210307-16:16:44.430|10=043|\r\n8=FIX4.4|9=000202|35=AE|49=accept-tls-comp|56=init-tls-comp|34=4|57=fix|52=20210307-16:16:44.431|571=100001|487=0|856=0|828=0|17=600001|39=2|570=N|55=Gold|48=Gold.INC|32=175|31=83.67|75=20210307|60=20210307-16:16:44.430|10=219|\r\n8=FIX4.4|9=000210|35=AE|49=accept-tls-comp|56=init-tls-comp|34=5|57=fix|52=20210307-16:16:44.432|571=100002|487=0|856=0|828=0|17=600002|39=2|570=N|55=Platinum|48=Platinum.INC|32=146|31=41.79|75=20210307|60=20210307-16:16:44.430|10=097|\r\n8=FIX4.4|9=000211|35=AE|49=accept-tls-comp|56=init-tls-comp|34=6|57=fix|52=20210307-16:16:44.432|571=100003|487=0|856=0|828=0|17=600003|39=2|570=N|55=Magnesium|48=Magnesium.INC|32=156|31=8.02|75=20210307|60=20210307-16:16:44.430|10=227|\r\n8=FIX4.4|9=000202|35=AE|49=accept-tls-comp|56=init-tls-comp|34=7|57=fix|52=20210307-16:16:44.432|571=100004|487=0|856=0|828=0|17=600004|39=2|570=N|55=Gold|48=Gold.INC|32=136|31=32.13|75=20210307|60=20210307-16:16:44.430|10=211|\r\n8=FIX4.4|9=000112|35=AQ|49=accept-tls-comp|56=init-tls-comp|34=8|57=fix|52=20210307-16:16:44.433|568=all-trades|569=0|749=0|750=1|10=144|\r\n8=FIX4.4|9=000202|35=AE|49=accept-tls-comp|56=init-tls-comp|34=9|57=fix|52=20210307-16:16:59.449|571=100005|487=0|856=0|828=0|17=600005|39=2|570=N|55=Gold|48=Gold.INC|32=166|31=53.91|75=20210307|60=20210307-16:16:59.449|10=001|\r\n8=FIX4.4|9=000206|35=AE|49=accept-tls-comp|56=init-tls-comp|34=10|57=fix|52=20210307-16:17:14.477|571=100006|487=0|856=0|828=0|17=600006|39=2|570=N|55=Silver|48=Silver.INC|32=105|31=61.2|75=20210307|60=20210307-16:17:14.477|10=191|\r\n */\r\n\r\ntest('check messages loaded into store', async () => {\r\n const state = await store.getState()\r\n expect(state.lastSeq).toEqual(10)\r\n expect(state.length).toEqual(9)\r\n})\r\n\r\ntest('fetch sequence number from store', async () => {\r\n const res1 = await store.exists(1)\r\n expect(res1).toBeFalsy()\r\n for (let seq = 2; seq <= 10; ++seq) {\r\n const res = await store.exists(seq)\r\n expect(res).toBeTruthy()\r\n const get = await store.get(seq)\r\n expect(get).toBeTruthy()\r\n }\r\n})\r\n\r\ntest('fetch from seqNum to inferred as end ', async () => {\r\n const range1 = await store.getSeqNumRange(5) // to the end\r\n expect(range1.length).toEqual(6)\r\n expect(range1[0].seqNum).toEqual(5)\r\n expect(range1[range1.length - 1].seqNum).toEqual(10)\r\n})\r\n\r\ntest('fetch from seqNum to = start', async () => {\r\n const range1 = await store.getSeqNumRange(5, 5)\r\n expect(range1.length).toEqual(1)\r\n expect(range1[0].seqNum).toEqual(5)\r\n})\r\n\r\ntest('fetch start from seqNum not in store', async () => {\r\n const range1 = await store.getSeqNumRange(1)\r\n expect(range1.length).toEqual(9)\r\n expect(range1[0].seqNum).toEqual(2)\r\n expect(range1[range1.length - 1].seqNum).toEqual(10)\r\n})\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import 'reflect-metadata';
|
|
@@ -9,28 +9,32 @@ 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
|
|
14
|
+
const ascii_1 = require("../buffer/ascii");
|
|
14
15
|
const util_1 = require("../util");
|
|
15
|
-
const transport_1 = require("../transport");
|
|
16
|
-
const config_1 = require("../config");
|
|
17
|
-
const ascii_1 = require("../transport/ascii/");
|
|
18
16
|
const __1 = require("..");
|
|
17
|
+
const ascii_msg_transmitter_1 = require("../transport/ascii/ascii-msg-transmitter");
|
|
18
|
+
const setup_1 = require("./env/setup");
|
|
19
|
+
const di_tokens_1 = require("../runtime/di-tokens");
|
|
19
20
|
let definitions;
|
|
20
21
|
let jsonHelper;
|
|
21
22
|
let config;
|
|
22
23
|
const root = path.join(__dirname, '../../data/examples/FIX.4.4/quickfix');
|
|
24
|
+
let setup;
|
|
23
25
|
beforeAll(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
setup = new setup_1.Setup('session/qf-fix44.json', 'session/qf-fix44.json');
|
|
27
|
+
yield setup.init();
|
|
28
|
+
definitions = setup.definitions;
|
|
26
29
|
jsonHelper = new util_1.JsonHelper(definitions);
|
|
27
|
-
config =
|
|
30
|
+
config = setup.clientConfig;
|
|
28
31
|
}), 45000);
|
|
29
32
|
function testEncodeDecode(msgType, msg) {
|
|
30
33
|
return __awaiter(this, void 0, void 0, function* () {
|
|
31
34
|
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
32
|
-
let session = new
|
|
33
|
-
const
|
|
35
|
+
let session = new ascii_msg_transmitter_1.AsciiMsgTransmitter(config);
|
|
36
|
+
const parseBuffer = config.sessionContainer.resolve(di_tokens_1.DITokens.ParseBuffer);
|
|
37
|
+
const parser = new ascii_1.AsciiParser(config, session.encodeStream, parseBuffer);
|
|
34
38
|
parser.on('msg', (msgType, view) => {
|
|
35
39
|
const o = view.toObject();
|
|
36
40
|
delete o.StandardHeader;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qf-full-msg.test.js","sourceRoot":"","sources":["../../src/test/qf-full-msg.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAA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IAAI,CAAC,CAAA","sourcesContent":["import 'reflect-metadata'\r\n\r\nimport * as path from 'path'\r\nimport { AsciiParser, AsciiView } from '../buffer/ascii'\r\nimport { ILooseObject } from '../collections/collection'\r\nimport { FixDefinitions } from '../dictionary/definition'\r\nimport { JsonHelper } from '../util'\r\nimport { ElasticBuffer, IJsFixConfig, MsgType } from '..'\r\nimport { AsciiMsgTransmitter } from '../transport/ascii/ascii-msg-transmitter'\r\nimport { Setup } from './env/setup'\r\nimport { DITokens } from '../runtime/di-tokens'\r\n\r\nlet definitions: FixDefinitions\r\nlet jsonHelper: JsonHelper\r\nlet config: IJsFixConfig\r\nconst root: string = path.join(__dirname, '../../data/examples/FIX.4.4/quickfix')\r\nlet setup: Setup\r\n\r\nbeforeAll(async () => {\r\n setup = new Setup('session/qf-fix44.json', 'session/qf-fix44.json')\r\n await setup.init()\r\n definitions = setup.definitions\r\n jsonHelper = new JsonHelper(definitions)\r\n config = setup.clientConfig\r\n}, 45000)\r\n\r\nasync function testEncodeDecode (msgType: string, msg: ILooseObject): Promise<ILooseObject> {\r\n // encode to FIX format from provided object.\r\n return new Promise(async (resolve, reject) => {\r\n let session: AsciiMsgTransmitter = new AsciiMsgTransmitter(config)\r\n const parseBuffer = config.sessionContainer.resolve<ElasticBuffer>(DITokens.ParseBuffer)\r\n const parser: AsciiParser = new AsciiParser(config, session.encodeStream, parseBuffer)\r\n parser.on('msg', (msgType: string, view: AsciiView) => {\r\n const o = view.toObject()\r\n delete o.StandardHeader\r\n delete o.StandardTrailer\r\n resolve(o)\r\n })\r\n parser.on('error', (e: Error) => {\r\n reject(e)\r\n })\r\n session.send(msgType, msg)\r\n })\r\n}\r\n\r\ntest('test logon JSON => object => fix => object', async () => {\r\n const msgType: string = MsgType.Logon\r\n const file: string = path.join(root, 'logon/object.json')\r\n const msg: ILooseObject = jsonHelper.fromJson(file, msgType)\r\n await expect(testEncodeDecode(msgType, msg)).resolves.toEqual(msg)\r\n}, 1000)\r\n\r\ntest('test execution report JSON => object => fix => object', async () => {\r\n const msgType: string = MsgType.ExecutionReport\r\n const file: string = path.join(root, 'execution-report/object.json')\r\n const msg: ILooseObject = jsonHelper.fromJson(file, msgType)\r\n await expect(testEncodeDecode(msgType, msg)).resolves.toEqual(msg)\r\n}, 2000)\r\n\r\ntest('test order cxl reject JSON => object => fix => object', async () => {\r\n const msgType: string = MsgType.OrderCancelReject\r\n const file: string = path.join(root, 'order-cancel-reject/object.json')\r\n const msg: ILooseObject = jsonHelper.fromJson(file, msgType)\r\n await expect(testEncodeDecode(msgType, msg)).resolves.toEqual(msg)\r\n}, 1000)\r\n\r\ntest('test quote request JSON => object => fix => object', async () => {\r\n const msgType: string = MsgType.QuoteRequest\r\n const file: string = path.join(root, 'quote-request/object.json')\r\n const msg: ILooseObject = jsonHelper.fromJson(file, msgType)\r\n await expect(testEncodeDecode(msgType, msg)).resolves.toEqual(msg)\r\n}, 1000)\r\n\r\ntest('test md request JSON => object => fix => object', async () => {\r\n const msgType: string = MsgType.MarketDataSnapshotFullRefresh\r\n const file: string = path.join(root, 'md-data-snapshot/object.json')\r\n const msg: ILooseObject = jsonHelper.fromJson(file, msgType)\r\n await expect(testEncodeDecode(msgType, msg)).resolves.toEqual(msg)\r\n}, 1000)\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import 'reflect-metadata';
|
|
@@ -9,28 +9,32 @@ 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
|
|
14
|
+
const ascii_1 = require("../buffer/ascii");
|
|
14
15
|
const util_1 = require("../util");
|
|
15
|
-
const transport_1 = require("../transport");
|
|
16
|
-
const config_1 = require("../config");
|
|
17
|
-
const ascii_1 = require("../transport/ascii");
|
|
18
16
|
const __1 = require("..");
|
|
17
|
+
const setup_1 = require("./env/setup");
|
|
18
|
+
const di_tokens_1 = require("../runtime/di-tokens");
|
|
19
19
|
let definitions;
|
|
20
20
|
let jsonHelper;
|
|
21
21
|
let session;
|
|
22
22
|
const root = path.join(__dirname, '../../data/examples/FIX.4.4/repo/');
|
|
23
|
+
let config;
|
|
24
|
+
let setup = null;
|
|
23
25
|
beforeAll(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
setup = new setup_1.Setup();
|
|
27
|
+
yield setup.init();
|
|
28
|
+
definitions = setup.definitions;
|
|
26
29
|
jsonHelper = new util_1.JsonHelper(definitions);
|
|
27
|
-
|
|
28
|
-
session =
|
|
29
|
-
})
|
|
30
|
+
config = setup.clientConfig;
|
|
31
|
+
session = setup.clientSessionContainer.resolve(di_tokens_1.DITokens.MsgTransmitter);
|
|
32
|
+
}));
|
|
30
33
|
function testEncodeDecode(msgType, msg) {
|
|
31
34
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32
35
|
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
33
|
-
const
|
|
36
|
+
const rxBuffer = config.sessionContainer.resolve(di_tokens_1.DITokens.ParseBuffer);
|
|
37
|
+
const parser = new ascii_1.AsciiParser(config, session.encodeStream, rxBuffer);
|
|
34
38
|
parser.on('msg', (msgType, view) => {
|
|
35
39
|
const o = view.toObject();
|
|
36
40
|
delete o['StandardHeader'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repo-full-ascii-msg.test.js","sourceRoot":"","sources":["../../src/test/repo-full-ascii-msg.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,6BAA4B;AAC5B,
|
|
1
|
+
{"version":3,"file":"repo-full-ascii-msg.test.js","sourceRoot":"","sources":["../../src/test/repo-full-ascii-msg.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,4BAAyB;AACzB,6BAA4B;AAC5B,2CAAwD;AAGxD,kCAAoC;AAEpC,0B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AsciiParser, AsciiView } from '../buffer/ascii'\r\nimport { ILooseObject } from '../collections/collection'\r\nimport { FixDefinitions } from '../dictionary/definition'\r\nimport { JsonHelper } from '../util'\r\nimport { IJsFixConfig } from '../config'\r\nimport { ElasticBuffer, MsgType } from '..'\r\nimport { AsciiMsgTransmitter } from '../transport/ascii/ascii-msg-transmitter'\r\nimport { Setup } from './env/setup'\r\nimport { DITokens } from '../runtime/di-tokens'\r\n\r\nlet definitions: FixDefinitions\r\nlet jsonHelper: JsonHelper\r\nlet session: AsciiMsgTransmitter\r\nconst root: string = path.join(__dirname, '../../data/examples/FIX.4.4/repo/')\r\nlet config: IJsFixConfig\r\nlet setup: Setup = null\r\nbeforeAll(async () => {\r\n setup = new Setup()\r\n await setup.init()\r\n definitions = setup.definitions\r\n jsonHelper = new JsonHelper(definitions)\r\n config = setup.clientConfig\r\n session = setup.clientSessionContainer.resolve<AsciiMsgTransmitter>(DITokens.MsgTransmitter)\r\n})\r\n\r\nasync function testEncodeDecode (msgType: string, msg: ILooseObject): Promise<ILooseObject> {\r\n // encode to FIX format from provided object.\r\n return new Promise(async (resolve, reject) => {\r\n const rxBuffer = config.sessionContainer.resolve<ElasticBuffer>(DITokens.ParseBuffer)\r\n const parser: AsciiParser = new AsciiParser(config, session.encodeStream, rxBuffer)\r\n parser.on('msg', (msgType: string, view: AsciiView) => {\r\n const o = view.toObject()\r\n delete o['StandardHeader']\r\n delete o['StandardTrailer']\r\n resolve(o)\r\n })\r\n parser.on('error', (e: Error) => {\r\n reject(e)\r\n })\r\n // encode the message\r\n session.send(msgType, msg)\r\n })\r\n}\r\n\r\ntest('check 1 digit checksum format', async () => {\r\n const factory = session.config.factory\r\n const cs = factory.trailer(1)\r\n expect(cs.CheckSum).toEqual('001')\r\n})\r\n\r\ntest('check 2 digit checksum format', async () => {\r\n const factory = session.config.factory\r\n const cs = factory.trailer(10)\r\n expect(cs.CheckSum).toEqual('010')\r\n})\r\n\r\ntest('check 3 digit checksum format', async () => {\r\n const factory = session.config.factory\r\n const cs = factory.trailer(100)\r\n expect(cs.CheckSum).toEqual('100')\r\n})\r\n\r\ntest('AE object to ascii fix to object', async () => {\r\n const msgType: string = MsgType.TradeCaptureReport\r\n const file: string = path.join(root, 'trade-capture/object.json')\r\n const msg: ILooseObject = jsonHelper.fromJson(file, msgType)\r\n const o: ILooseObject = await testEncodeDecode(msgType, msg)\r\n\r\n expect(o).toEqual(msg)\r\n}, 1000)\r\n\r\ntest('d object to ascii fix to object', async () => {\r\n const msgType: string = MsgType.SecurityDefinition\r\n const file: string = path.join(root, 'security-definition/object.json')\r\n const msg: ILooseObject = jsonHelper.fromJson(file, msgType)\r\n const o: ILooseObject = await testEncodeDecode(msgType, msg)\r\n\r\n expect(o).toEqual(msg)\r\n}, 1000)\r\n\r\ntest('D object to ascii fix to object', async () => {\r\n const msgType: string = MsgType.NewOrderSingle\r\n const file: string = path.join(root, 'new-order-single/object.json')\r\n const msg: ILooseObject = jsonHelper.fromJson(file, msgType)\r\n const o: ILooseObject = await testEncodeDecode(msgType, msg)\r\n\r\n expect(o).toEqual(msg)\r\n}, 1000)\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import 'reflect-metadata';
|
|
@@ -9,10 +9,13 @@ 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
14
|
const transport_1 = require("../transport");
|
|
14
15
|
const config_1 = require("../config");
|
|
15
16
|
const buffer_1 = require("../buffer");
|
|
17
|
+
const ascii_1 = require("../buffer/ascii");
|
|
18
|
+
const fixml_1 = require("../buffer/fixml");
|
|
16
19
|
const util_1 = require("../util");
|
|
17
20
|
let definitions;
|
|
18
21
|
let jsonHelper;
|
|
@@ -20,17 +23,17 @@ let sessionDescription;
|
|
|
20
23
|
const root = path.join(__dirname, '../../data/examples/FIXML');
|
|
21
24
|
beforeAll(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
22
25
|
sessionDescription = require(path.join(root, '../../session/test-initiator.json'));
|
|
23
|
-
definitions = yield util_1.getDefinitions('repofixml');
|
|
26
|
+
definitions = yield new util_1.DefinitionFactory().getDefinitions('repofixml');
|
|
24
27
|
jsonHelper = new util_1.JsonHelper(definitions);
|
|
25
28
|
}), 45000);
|
|
26
29
|
function testEncodeDecode(asObj, msgType) {
|
|
27
30
|
return __awaiter(this, void 0, void 0, function* () {
|
|
28
31
|
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
const fe = new
|
|
32
|
+
const fe = new fixml_1.FixmlEncoder(new buffer_1.ElasticBuffer(), definitions);
|
|
30
33
|
fe.encode(asObj, msgType);
|
|
31
34
|
const fixml = fe.buffer.toString();
|
|
32
|
-
const config = new config_1.JsFixConfig(null, definitions, sessionDescription,
|
|
33
|
-
const xmlParser = new
|
|
35
|
+
const config = new config_1.JsFixConfig(null, definitions, sessionDescription, ascii_1.AsciiChars.Pipe);
|
|
36
|
+
const xmlParser = new fixml_1.FiXmlParser(config, new transport_1.StringDuplex(fixml).readable);
|
|
34
37
|
if (asObj.Batch) {
|
|
35
38
|
xmlParser.on('batch', (msgType, v) => {
|
|
36
39
|
const o = v.toObject();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repo-full-fixml-msg.test.js","sourceRoot":"","sources":["../../src/test/repo-full-fixml-msg.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,6BAA4B;AAG5B,4CAAgE;AAChE,sCAAuC;AACvC,sCAAoG;AACpG,kCAAoD;AAEpD,IAAI,WAA2B,CAAA;AAC/B,IAAI,UAAsB,CAAA;AAC1B,IAAI,kBAAuC,CAAA;AAC3C,MAAM,IAAI,GAAW,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,2BAA2B,CAAC,CAAA;AAEtE,SAAS,CAAC,GAAS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AAO,CAAC,CAAA;IAC9D,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AAC1B,CAAC,CAAA,EAAE,IAAI,CAAC,CAAA;AAER,IAAI,CAAC,sBAAsB,EAAE,GAAS,EAAE;IACtC,MAAM,OAAO,GAAW,SAAS,CAAA;IACjC,MAAM,IAAI,GAAW,IAAI,CAAC,IAAI,CAAC,IAAI,EAAC,OAAO,CAAC,CAAA;IAC5C,MAAM,KAAK,GAAiB,UAAU,CAAC,QAAQ,CAAC,GAAG,IAAI,cAAc,EAAE,OAAO,CAAC,CAAA;IAC/E,MAAM,CAAC,GAAiB,MAAM,gBAAgB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;IAC9D,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AAC1B,CAAC,CAAA,EAAE,IAAI,CAAC,CAAA","sourcesContent":["import * as path from 'path'\r\nimport { ILooseObject } from '../collections/collection'\r\nimport { FixDefinitions } from '../dictionary'\r\nimport { ISessionDescription, StringDuplex } from '../transport'\r\nimport { JsFixConfig } from '../config'\r\nimport { MsgView, ElasticBuffer, MsgParser, AsciiChars, FixmlEncoder, FiXmlParser } from '../buffer'\r\nimport { getDefinitions, JsonHelper } from '../util'\r\n\r\nlet definitions: FixDefinitions\r\nlet jsonHelper: JsonHelper\r\nlet sessionDescription: ISessionDescription\r\nconst root: string = path.join(__dirname, '../../data/examples/FIXML')\r\n\r\nbeforeAll(async () => {\r\n sessionDescription = require(path.join(root, '../../session/test-initiator.json'))\r\n definitions = await getDefinitions('repofixml')\r\n jsonHelper = new JsonHelper(definitions)\r\n}, 45000)\r\n\r\nasync function testEncodeDecode (asObj: ILooseObject, msgType: string): Promise<ILooseObject> {\r\n // encode to FIXML format from provided object.\r\n return new Promise(async (resolve, reject) => {\r\n const fe = new FixmlEncoder(new ElasticBuffer(), definitions)\r\n fe.encode(asObj, msgType)\r\n const fixml: string = fe.buffer.toString()\r\n const config = new JsFixConfig(null, definitions, sessionDescription, AsciiChars.Pipe)\r\n const xmlParser: MsgParser = new FiXmlParser(config, new StringDuplex(fixml).readable)\r\n if (asObj.Batch) {\r\n xmlParser.on('batch', (msgType: string, v: MsgView) => {\r\n const o: ILooseObject = v.toObject()\r\n resolve(o)\r\n })\r\n } else {\r\n xmlParser.on('msg', (msgType: string, v: MsgView) => {\r\n const o: ILooseObject = v.toObject()\r\n resolve(o)\r\n })\r\n }\r\n\r\n xmlParser.on('error', (e) => {\r\n reject(e)\r\n })\r\n })\r\n}\r\n\r\ntest('MktDataFull settle fixml object', async () => {\r\n const msgType: string = 'MktDataFull'\r\n const file: string = path.join(root,'cme/md/settle')\r\n const asObj: ILooseObject = jsonHelper.fromJson(`${file}/object.json`, msgType)\r\n const o: ILooseObject = await testEncodeDecode(asObj, msgType)\r\n expect(o).toEqual(asObj)\r\n}, 1000)\r\n\r\ntest('AllocInstrctn fixml object', async () => {\r\n const msgType: string = 'AllocInstrctn'\r\n const file: string = path.join(root,'cme/alloc/Claiming Firm Requests Sub-allocation with Allocation Instructions/')\r\n const asObj: ILooseObject = jsonHelper.fromJson(`${file}/object.json`, msgType)\r\n const o: ILooseObject = await testEncodeDecode(asObj, msgType)\r\n expect(o).toEqual(asObj)\r\n}, 1000)\r\n\r\ntest('AllocRpt fixml object', async () => {\r\n const msgType: string = 'AllocRpt'\r\n const file: string = path.join(root,'cme/alloc/Clearing System Notifies Allocation to the Claiming Firm - Cross-Exchange/')\r\n const asObj: ILooseObject = jsonHelper.fromJson(`${file}/object.json`, msgType)\r\n const o: ILooseObject = await testEncodeDecode(asObj, msgType)\r\n expect(o).toEqual(asObj)\r\n}, 1000)\r\n\r\ntest('TrdCaptRpt fixml object', async () => {\r\n const msgType: string = 'TrdCaptRpt'\r\n const file: string = path.join(root,'cme/tc/Delivery Fixed Commodity Swap')\r\n const asObj: ILooseObject = jsonHelper.fromJson(`${file}/object.json`, msgType)\r\n const o: ILooseObject = await testEncodeDecode(asObj, msgType)\r\n expect(o).toEqual(asObj)\r\n}, 1000)\r\n\r\ntest('MktDataFull fixml object', async () => {\r\n const msgType: string = 'MktDataFull'\r\n const file: string = path.join(root,'cme/md/futures')\r\n const asObj: ILooseObject = jsonHelper.fromJson(`${file}/object.json`, msgType)\r\n const o: ILooseObject = await testEncodeDecode(asObj, msgType)\r\n expect(o).toEqual(asObj)\r\n}, 1000)\r\n\r\ntest('UserReq logon fixml object', async () => {\r\n const msgType: string = 'UserReq'\r\n const file: string = path.join(root,'cme/ur/logon')\r\n const asObj: ILooseObject = jsonHelper.fromJson(`${file}/object.json`, msgType)\r\n const o: ILooseObject = await testEncodeDecode(asObj, msgType)\r\n expect(o).toEqual(asObj)\r\n}, 1000)\r\n\r\ntest('UserReq logoff fixml object', async () => {\r\n const msgType: string = 'UserReq'\r\n const file: string = path.join(root,'cme/ur/logoff')\r\n const asObj: ILooseObject = jsonHelper.fromJson(`${file}/object.json`, msgType)\r\n const o: ILooseObject = await testEncodeDecode(asObj, msgType)\r\n expect(o).toEqual(asObj)\r\n}, 1000)\r\n\r\ntest('TrdCaptRpt 2 fixml object', async () => {\r\n const msgType: string = 'TrdCaptRpt'\r\n const file: string = path.join(root,'cme/tc/Initial Single Side Submission')\r\n const asObj: ILooseObject = jsonHelper.fromJson(`${file}/object.json`, msgType)\r\n const o: ILooseObject = await testEncodeDecode(asObj, msgType)\r\n expect(o).toEqual(asObj)\r\n}, 1000)\r\n\r\ntest('TrdCaptRpt 3 fixml object', async () => {\r\n const msgType: string = 'TrdCaptRpt'\r\n const file: string = path.join(root,'cme/tc/Accepted Unmatched')\r\n const asObj: ILooseObject = jsonHelper.fromJson(`${file}/object.json`, msgType)\r\n const o: ILooseObject = await testEncodeDecode(asObj, msgType)\r\n expect(o).toEqual(asObj)\r\n}, 1000)\r\n\r\ntest('TrdCaptRptReq fixml object', async () => {\r\n const msgType: string = 'TrdCaptRptReq'\r\n const file: string = path.join(root,'cme/tc/Trading Firm Continued Subscription')\r\n const asObj: ILooseObject = jsonHelper.fromJson(`${file}/object.json`, msgType)\r\n const o: ILooseObject = await testEncodeDecode(asObj, msgType)\r\n expect(o).toEqual(asObj)\r\n}, 1000)\r\n\r\ntest('Order fixml object', async () => {\r\n const msgType: string = 'Order'\r\n const file: string = path.join(root,'om/nso')\r\n const asObj: ILooseObject = jsonHelper.fromJson(`${file}/object.json`, msgType)\r\n const o: ILooseObject = await testEncodeDecode(asObj, msgType)\r\n expect(o).toEqual(asObj)\r\n}, 1000)\r\n\r\ntest('ExecRpt fixml object', async () => {\r\n const msgType: string = 'ExecRpt'\r\n const file: string = path.join(root,'om/er')\r\n const asObj: ILooseObject = jsonHelper.fromJson(`${file}/object.json`, msgType)\r\n const o: ILooseObject = await testEncodeDecode(asObj, msgType)\r\n expect(o).toEqual(asObj)\r\n}, 1000)\r\n"]}
|
|
1
|
+
{"version":3,"file":"repo-full-fixml-msg.test.js","sourceRoot":"","sources":["../../src/test/repo-full-fixml-msg.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,4BAAyB;AAEzB,6BAA4B;AAG5B,4CAAgE;AAChE,sCAAuC;AACvC,sCAA6D;AAC7D,2CAA4C;AAC5C,2CAA2D;AAC3D,kCAAuD;AAEvD,IAAI,WAA2B,CAAA;AAC/B,IAAI,UAAsB,CAAA;AAC1B,IAAI,kBAAuC,CAAA;AAC3C,MAAM,IAAI,GAAW,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,2BAA2B,CAAC,CAAA;AAEtE,SAAS,CAAC,GAAS,EAAE;IACnB,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,mCAAmC,CAAC,CAAC,CAAA;IAClF,WAAW,GAAG,MAAM,IAAI,wBAAiB,EAAE,CAAC,cAAc,CAAC,WAAW,CAAC,CAAA;IACvE,UAAU,GAAG,IAAI,iBAAU,CAAC,WAAW,CAAC,CAAA;AAC1C,CAAC,CAAA,EAAE,KAAK,CAAC,CAAA;A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I,EAAC,OAAO,CAAC,CAAA;IAC5C,MAAM,KAAK,GAAiB,UAAU,CAAC,QAAQ,CAAC,GAAG,IAAI,cAAc,EAAE,OAAO,CAAC,CAAA;IAC/E,MAAM,CAAC,GAAiB,MAAM,gBAAgB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;IAC9D,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AAC1B,CAAC,CAAA,EAAE,IAAI,CAAC,CAAA","sourcesContent":["import 'reflect-metadata'\r\n\r\nimport * as path from 'path'\r\nimport { ILooseObject } from '../collections/collection'\r\nimport { FixDefinitions } from '../dictionary/definition'\r\nimport { ISessionDescription, StringDuplex } from '../transport'\r\nimport { JsFixConfig } from '../config'\r\nimport { MsgView, ElasticBuffer, MsgParser } from '../buffer'\r\nimport { AsciiChars } from '../buffer/ascii'\r\nimport { FixmlEncoder, FiXmlParser } from '../buffer/fixml'\r\nimport { DefinitionFactory, JsonHelper } from '../util'\r\n\r\nlet definitions: FixDefinitions\r\nlet jsonHelper: JsonHelper\r\nlet sessionDescription: ISessionDescription\r\nconst root: string = path.join(__dirname, '../../data/examples/FIXML')\r\n\r\nbeforeAll(async () => {\r\n sessionDescription = require(path.join(root, '../../session/test-initiator.json'))\r\n definitions = await new DefinitionFactory().getDefinitions('repofixml')\r\n jsonHelper = new JsonHelper(definitions)\r\n}, 45000)\r\n\r\nasync function testEncodeDecode (asObj: ILooseObject, msgType: string): Promise<ILooseObject> {\r\n // encode to FIXML format from provided object.\r\n return new Promise(async (resolve, reject) => {\r\n const fe = new FixmlEncoder(new ElasticBuffer(), definitions)\r\n fe.encode(asObj, msgType)\r\n const fixml: string = fe.buffer.toString()\r\n const config = new JsFixConfig(null, definitions, sessionDescription, AsciiChars.Pipe)\r\n const xmlParser: MsgParser = new FiXmlParser(config, new StringDuplex(fixml).readable)\r\n if (asObj.Batch) {\r\n xmlParser.on('batch', (msgType: string, v: MsgView) => {\r\n const o: ILooseObject = v.toObject()\r\n resolve(o)\r\n })\r\n } else {\r\n xmlParser.on('msg', (msgType: string, v: MsgView) => {\r\n const o: ILooseObject = v.toObject()\r\n resolve(o)\r\n })\r\n }\r\n\r\n xmlParser.on('error', (e) => {\r\n reject(e)\r\n })\r\n })\r\n}\r\n\r\ntest('MktDataFull settle fixml object', async () => {\r\n const msgType: string = 'MktDataFull'\r\n const file: string = path.join(root,'cme/md/settle')\r\n const asObj: ILooseObject = jsonHelper.fromJson(`${file}/object.json`, msgType)\r\n const o: ILooseObject = await testEncodeDecode(asObj, msgType)\r\n expect(o).toEqual(asObj)\r\n}, 1000)\r\n\r\ntest('AllocInstrctn fixml object', async () => {\r\n const msgType: string = 'AllocInstrctn'\r\n const file: string = path.join(root,'cme/alloc/Claiming Firm Requests Sub-allocation with Allocation Instructions/')\r\n const asObj: ILooseObject = jsonHelper.fromJson(`${file}/object.json`, msgType)\r\n const o: ILooseObject = await testEncodeDecode(asObj, msgType)\r\n expect(o).toEqual(asObj)\r\n}, 1000)\r\n\r\ntest('AllocRpt fixml object', async () => {\r\n const msgType: string = 'AllocRpt'\r\n const file: string = path.join(root,'cme/alloc/Clearing System Notifies Allocation to the Claiming Firm - Cross-Exchange/')\r\n const asObj: ILooseObject = jsonHelper.fromJson(`${file}/object.json`, msgType)\r\n const o: ILooseObject = await testEncodeDecode(asObj, msgType)\r\n expect(o).toEqual(asObj)\r\n}, 1000)\r\n\r\ntest('TrdCaptRpt fixml object', async () => {\r\n const msgType: string = 'TrdCaptRpt'\r\n const file: string = path.join(root,'cme/tc/Delivery Fixed Commodity Swap')\r\n const asObj: ILooseObject = jsonHelper.fromJson(`${file}/object.json`, msgType)\r\n const o: ILooseObject = await testEncodeDecode(asObj, msgType)\r\n expect(o).toEqual(asObj)\r\n}, 1000)\r\n\r\ntest('MktDataFull fixml object', async () => {\r\n const msgType: string = 'MktDataFull'\r\n const file: string = path.join(root,'cme/md/futures')\r\n const asObj: ILooseObject = jsonHelper.fromJson(`${file}/object.json`, msgType)\r\n const o: ILooseObject = await testEncodeDecode(asObj, msgType)\r\n expect(o).toEqual(asObj)\r\n}, 1000)\r\n\r\ntest('UserReq logon fixml object', async () => {\r\n const msgType: string = 'UserReq'\r\n const file: string = path.join(root,'cme/ur/logon')\r\n const asObj: ILooseObject = jsonHelper.fromJson(`${file}/object.json`, msgType)\r\n const o: ILooseObject = await testEncodeDecode(asObj, msgType)\r\n expect(o).toEqual(asObj)\r\n}, 1000)\r\n\r\ntest('UserReq logoff fixml object', async () => {\r\n const msgType: string = 'UserReq'\r\n const file: string = path.join(root,'cme/ur/logoff')\r\n const asObj: ILooseObject = jsonHelper.fromJson(`${file}/object.json`, msgType)\r\n const o: ILooseObject = await testEncodeDecode(asObj, msgType)\r\n expect(o).toEqual(asObj)\r\n}, 1000)\r\n\r\ntest('TrdCaptRpt 2 fixml object', async () => {\r\n const msgType: string = 'TrdCaptRpt'\r\n const file: string = path.join(root,'cme/tc/Initial Single Side Submission')\r\n const asObj: ILooseObject = jsonHelper.fromJson(`${file}/object.json`, msgType)\r\n const o: ILooseObject = await testEncodeDecode(asObj, msgType)\r\n expect(o).toEqual(asObj)\r\n}, 1000)\r\n\r\ntest('TrdCaptRpt 3 fixml object', async () => {\r\n const msgType: string = 'TrdCaptRpt'\r\n const file: string = path.join(root,'cme/tc/Accepted Unmatched')\r\n const asObj: ILooseObject = jsonHelper.fromJson(`${file}/object.json`, msgType)\r\n const o: ILooseObject = await testEncodeDecode(asObj, msgType)\r\n expect(o).toEqual(asObj)\r\n}, 1000)\r\n\r\ntest('TrdCaptRptReq fixml object', async () => {\r\n const msgType: string = 'TrdCaptRptReq'\r\n const file: string = path.join(root,'cme/tc/Trading Firm Continued Subscription')\r\n const asObj: ILooseObject = jsonHelper.fromJson(`${file}/object.json`, msgType)\r\n const o: ILooseObject = await testEncodeDecode(asObj, msgType)\r\n expect(o).toEqual(asObj)\r\n}, 1000)\r\n\r\ntest('Order fixml object', async () => {\r\n const msgType: string = 'Order'\r\n const file: string = path.join(root,'om/nso')\r\n const asObj: ILooseObject = jsonHelper.fromJson(`${file}/object.json`, msgType)\r\n const o: ILooseObject = await testEncodeDecode(asObj, msgType)\r\n expect(o).toEqual(asObj)\r\n}, 1000)\r\n\r\ntest('ExecRpt fixml object', async () => {\r\n const msgType: string = 'ExecRpt'\r\n const file: string = path.join(root,'om/er')\r\n const asObj: ILooseObject = jsonHelper.fromJson(`${file}/object.json`, msgType)\r\n const o: ILooseObject = await testEncodeDecode(asObj, msgType)\r\n expect(o).toEqual(asObj)\r\n}, 1000)\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import 'reflect-metadata';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-state.test.js","sourceRoot":"","sources":["../../src/test/session-state.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"session-state.test.js","sourceRoot":"","sources":["../../src/test/session-state.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,4BAAyB;AAEzB,4CAAuE;AAEvE,IAAI,KAAsB,CAAA;AAC1B,IAAI,GAAS,CAAA;AAEb,UAAU,CAAC,GAAS,EAAE;IACpB,KAAK,GAAG,IAAI,2BAAe,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAA;IAC9C,KAAK,CAAC,KAAK,GAAG,wBAAY,CAAC,uBAAuB,CAAA;IAClD,GAAG,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;IACvC,KAAK,CAAC,UAAU,GAAG,GAAG,CAAA;IACtB,KAAK,CAAC,cAAc,GAAG,GAAG,CAAA;IAC1B,KAAK,CAAC,iBAAiB,GAAG,EAAE,CAAA;IAC5B,KAAK,CAAC,iBAAiB,GAAG,CAAC,CAAA;AAC7B,CAAC,CAAA,CAAC,CAAA;AAEF,IAAI,CAAC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AO,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAA;IAChD,KAAK,CAAC,KAAK,GAAG,wBAAY,CAAC,oBAAoB,CAAA;IAC/C,KAAK,CAAC,UAAU,GAAG,GAAG,CAAA;IACtB,KAAK,CAAC,cAAc,GAAG,GAAG,CAAA;IAC1B,KAAK,CAAC,YAAY,GAAG,GAAG,CAAA;IACxB,MAAM,MAAM,GAAe,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAA;IAEjD,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IACvC,MAAM,CAAC,KAAK,CAAC,eAAe,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9C,MAAM,CAAC,KAAK,CAAC,eAAe,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9C,MAAM,CAAC,KAAK,CAAC,iBAAiB,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAEhD,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,sBAAU,CAAC,IAAI,CAAC,CAAA;AACzC,CAAC,CAAC,CAAA","sourcesContent":["import 'reflect-metadata'\r\n\r\nimport { SessionState,TickAction, FixSessionState } from '../transport'\r\n\r\nlet state: FixSessionState\r\nlet now: Date\r\n\r\nbeforeEach(async () => {\r\n state = new FixSessionState({ heartBeat: 30 })\r\n state.state = SessionState.InitiationLogonResponse\r\n now = new Date(2018, 0, 1, 20, 0, 0, 0)\r\n state.LastSentAt = now\r\n state.lastReceivedAt = now\r\n state.peerHeartBeatSecs = 30\r\n state.lastPeerMsgSeqNum = 1\r\n})\r\n\r\ntest('do nothing', () => {\r\n const action: TickAction = state.calcAction(now)\r\n expect(action).toEqual(TickAction.Nothing)\r\n})\r\n\r\ntest('heartbeat', () => {\r\n const next = new Date(now.getTime() + 31 * 1000)\r\n state.lastReceivedAt = next\r\n const action: TickAction = state.calcAction(next)\r\n\r\n expect(state.timeToDie()).toEqual(false)\r\n expect(state.timeToHeartbeat()).toEqual(true)\r\n expect(state.timeToTerminate()).toEqual(false)\r\n expect(state.timeToTestRequest()).toEqual(false)\r\n\r\n expect(action).toEqual(TickAction.Heartbeat)\r\n})\r\n\r\ntest('testrequest', () => {\r\n const next = new Date(now.getTime() + 51 * 1000)\r\n state.LastSentAt = next\r\n const action: TickAction = state.calcAction(next)\r\n\r\n expect(state.timeToDie()).toEqual(false)\r\n expect(state.timeToHeartbeat()).toEqual(false)\r\n expect(state.timeToTerminate()).toEqual(false)\r\n expect(state.timeToTestRequest()).toEqual(true)\r\n\r\n expect(action).toEqual(TickAction.TestRequest)\r\n})\r\n\r\ntest('testrequest - no response', () => {\r\n const next = new Date(now.getTime() + 55 * 2 * 1000)\r\n state.LastSentAt = next\r\n state.lastTestRequestAt = now\r\n const action: TickAction = state.calcAction(next)\r\n\r\n expect(state.timeToDie()).toEqual(false)\r\n expect(state.timeToHeartbeat()).toEqual(false)\r\n expect(state.timeToTerminate()).toEqual(true)\r\n expect(state.timeToTestRequest()).toEqual(true)\r\n\r\n expect(action).toEqual(TickAction.TerminateOnError)\r\n})\r\n\r\ntest('time to die - no logout response', () => {\r\n const next = new Date(now.getTime() + 20 * 1000)\r\n state.state = SessionState.WaitingLogoutConfirm\r\n state.LastSentAt = now\r\n state.lastReceivedAt = now\r\n state.logoutSentAt = now\r\n const action: TickAction = state.calcAction(next)\r\n\r\n expect(state.timeToDie()).toEqual(true)\r\n expect(state.timeToHeartbeat()).toEqual(false)\r\n expect(state.timeToTerminate()).toEqual(false)\r\n expect(state.timeToTestRequest()).toEqual(false)\r\n\r\n expect(action).toEqual(TickAction.Stop)\r\n})\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import 'reflect-metadata';
|
|
@@ -9,63 +9,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
|
|
13
|
-
const transport_1 = require("../transport");
|
|
12
|
+
require("reflect-metadata");
|
|
14
13
|
const types_1 = require("../types");
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const util_1 = require("../util");
|
|
19
|
-
const ascii_1 = require("../transport/ascii/");
|
|
20
|
-
const root = path.join(__dirname, '../../data');
|
|
14
|
+
const setup_1 = require("./env/setup");
|
|
15
|
+
const experiment_1 = require("./env/experiment");
|
|
16
|
+
const skeleton_runner_1 = require("./env/skeleton-runner");
|
|
21
17
|
const logonMsg = '8=FIX4.4|9=0000136|35=A|49=init-comp|56=accept-comp|34=1|57=fix|52=20180902-12:25:28.980|98=0|108=30|141=Y|553=js-client|554=pwd-client|10=177|';
|
|
22
18
|
const heartbeat = '8=FIX4.4|9=0000123|35=0|49=init-comp|56=accept-comp|34=1|57=fix|52=20180902-12:25:59.161|112=Sun, 02 Sep 2018 12:25:59 GMT|10=95|';
|
|
23
|
-
class FixEntity {
|
|
24
|
-
constructor(config, duplex = new transport_1.StringDuplex(), transport = new transport_1.MsgTransport(0, config, duplex)) {
|
|
25
|
-
this.config = config;
|
|
26
|
-
this.duplex = duplex;
|
|
27
|
-
this.transport = transport;
|
|
28
|
-
this.views = [];
|
|
29
|
-
this.errors = [];
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
class Setup {
|
|
33
|
-
constructor() {
|
|
34
|
-
this.clientDescription = require(path.join(root, 'session/test-initiator.json'));
|
|
35
|
-
this.serverDescription = require(path.join(root, 'session/test-acceptor.json'));
|
|
36
|
-
}
|
|
37
|
-
init() {
|
|
38
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
this.definitions = yield util_1.getDefinitions(this.clientDescription.application.dictionary);
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
19
|
let setup = null;
|
|
44
20
|
let experiment = null;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
this.clientFactory = new ascii_1.AsciiSessionMsgFactory(setup.clientDescription);
|
|
48
|
-
this.serverFactory = new ascii_1.AsciiSessionMsgFactory(setup.serverDescription);
|
|
49
|
-
const clientConfig = new config_1.JsFixConfig(this.clientFactory, setup.definitions, setup.clientDescription, buffer_1.AsciiChars.Pipe);
|
|
50
|
-
const serverConfig = new config_1.JsFixConfig(this.serverFactory, setup.definitions, setup.serverDescription, buffer_1.AsciiChars.Pipe);
|
|
51
|
-
this.client = new FixEntity(clientConfig);
|
|
52
|
-
this.server = new FixEntity(serverConfig);
|
|
53
|
-
this.loopBack(this.client.duplex, this.server.duplex);
|
|
54
|
-
this.loopBack(this.server.duplex, this.client.duplex);
|
|
55
|
-
}
|
|
56
|
-
loopBack(lhs, rhs) {
|
|
57
|
-
lhs.writable.on('data', (data) => {
|
|
58
|
-
rhs.readable.push(data);
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
beforeAll(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
63
|
-
setup = new Setup();
|
|
21
|
+
beforeEach(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
22
|
+
setup = new setup_1.Setup();
|
|
64
23
|
yield setup.init();
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
experiment = new Experiment();
|
|
68
|
-
});
|
|
24
|
+
experiment = new experiment_1.Experiment(setup);
|
|
25
|
+
}));
|
|
69
26
|
class ParsingResult {
|
|
70
27
|
constructor(event, msgType, view) {
|
|
71
28
|
this.event = event;
|
|
@@ -90,97 +47,9 @@ function clientToServerWaitFirstMessage(type, obj) {
|
|
|
90
47
|
experiment.client.transport.end();
|
|
91
48
|
});
|
|
92
49
|
}
|
|
93
|
-
class SkeletonRunner {
|
|
94
|
-
constructor(logoutSeconds = 1) {
|
|
95
|
-
this.logoutSeconds = logoutSeconds;
|
|
96
|
-
this.clientSkeleton = new skeleton_session_1.SkeletonSession(experiment.client.config, logoutSeconds);
|
|
97
|
-
this.serverSkeleton = new skeleton_session_1.SkeletonSession(experiment.server.config, logoutSeconds);
|
|
98
|
-
this.clientSkeleton.checkMsgIntegrity = true;
|
|
99
|
-
this.serverSkeleton.checkMsgIntegrity = true;
|
|
100
|
-
experiment.client.transport.receiver.on('msg', (type, view) => {
|
|
101
|
-
experiment.client.views.push(view.clone());
|
|
102
|
-
this.watchdog();
|
|
103
|
-
});
|
|
104
|
-
experiment.server.transport.receiver.on('msg', (type, view) => {
|
|
105
|
-
experiment.server.views.push(view.clone());
|
|
106
|
-
this.watchdog();
|
|
107
|
-
});
|
|
108
|
-
this.clientSkeleton.on('error', e => {
|
|
109
|
-
experiment.client.errors.push(e);
|
|
110
|
-
});
|
|
111
|
-
this.serverSkeleton.on('error', e => {
|
|
112
|
-
experiment.server.errors.push(e);
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
watchdog() {
|
|
116
|
-
const cviews = experiment.client.views;
|
|
117
|
-
const sviews = experiment.server.views;
|
|
118
|
-
const cerrors = experiment.client.errors;
|
|
119
|
-
const serrors = experiment.server.errors;
|
|
120
|
-
const clientStop = cviews.length > 20 || cerrors.length > 0;
|
|
121
|
-
const serverStop = sviews.length > 20 || serrors.length > 0;
|
|
122
|
-
const stop = clientStop || serverStop;
|
|
123
|
-
if (stop) {
|
|
124
|
-
this.clientSkeleton.done();
|
|
125
|
-
this.serverSkeleton.done();
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
sendMsg(msgType, o) {
|
|
129
|
-
let count = 0;
|
|
130
|
-
experiment.client.transport.receiver.on('msg', m => {
|
|
131
|
-
if (count === 0) {
|
|
132
|
-
count++;
|
|
133
|
-
this.clientSkeleton.sendMessage(msgType, o);
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
sendText(followOn) {
|
|
138
|
-
if (followOn) {
|
|
139
|
-
let sent = false;
|
|
140
|
-
experiment.client.transport.transmitter.on('encoded', () => {
|
|
141
|
-
const b1 = new buffer_1.ElasticBuffer();
|
|
142
|
-
b1.writeString(followOn);
|
|
143
|
-
if (!sent) {
|
|
144
|
-
experiment.client.transport.duplex.writable.write(b1.slice());
|
|
145
|
-
const at = experiment.client.transport.transmitter;
|
|
146
|
-
at.msgSeqNum++;
|
|
147
|
-
sent = true;
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
done() {
|
|
153
|
-
this.clientSkeleton.done();
|
|
154
|
-
this.serverSkeleton.done();
|
|
155
|
-
}
|
|
156
|
-
wait() {
|
|
157
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
158
|
-
yield Promise.all([
|
|
159
|
-
this.clientSkeleton.run(experiment.client.transport),
|
|
160
|
-
this.serverSkeleton.run(experiment.server.transport),
|
|
161
|
-
new Promise((accept, reject) => {
|
|
162
|
-
let handle = null;
|
|
163
|
-
try {
|
|
164
|
-
handle = setTimeout(() => {
|
|
165
|
-
this.done();
|
|
166
|
-
accept(true);
|
|
167
|
-
}, (this.logoutSeconds + 2) * 1000);
|
|
168
|
-
}
|
|
169
|
-
catch (e) {
|
|
170
|
-
if (handle) {
|
|
171
|
-
clearTimeout(handle);
|
|
172
|
-
}
|
|
173
|
-
this.done();
|
|
174
|
-
reject(e);
|
|
175
|
-
}
|
|
176
|
-
})
|
|
177
|
-
]);
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
50
|
function runSkeletons(logoutSeconds = 1, followOn = null) {
|
|
182
51
|
return __awaiter(this, void 0, void 0, function* () {
|
|
183
|
-
const runner = new SkeletonRunner(logoutSeconds);
|
|
52
|
+
const runner = new skeleton_runner_1.SkeletonRunner(experiment, logoutSeconds);
|
|
184
53
|
runner.sendText(followOn);
|
|
185
54
|
yield runner.wait();
|
|
186
55
|
});
|
|
@@ -197,7 +66,7 @@ test('end to end logon', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
197
66
|
expect(received).toEqual(lo);
|
|
198
67
|
}));
|
|
199
68
|
test('session send resendRequest when logged on', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
200
|
-
const runner = new SkeletonRunner(2);
|
|
69
|
+
const runner = new skeleton_runner_1.SkeletonRunner(experiment, 2);
|
|
201
70
|
const factory = experiment.client.config.factory;
|
|
202
71
|
const resend = factory.resendRequest(1, 2);
|
|
203
72
|
runner.sendMsg(types_1.MsgType.ResendRequest, resend);
|
|
@@ -217,7 +86,7 @@ test('session send resendRequest when logged on', () => __awaiter(void 0, void 0
|
|
|
217
86
|
}
|
|
218
87
|
}));
|
|
219
88
|
test('session send logon when logged on', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
220
|
-
const runner = new SkeletonRunner(2);
|
|
89
|
+
const runner = new skeleton_runner_1.SkeletonRunner(experiment, 2);
|
|
221
90
|
const logon = experiment.client.config.factory.logon();
|
|
222
91
|
runner.sendMsg(types_1.MsgType.Logon, logon);
|
|
223
92
|
try {
|
|
@@ -314,8 +183,8 @@ test('client unknown msg type', () => __awaiter(void 0, void 0, void 0, function
|
|
|
314
183
|
yield runSkeletons(2, changed);
|
|
315
184
|
const cviews = experiment.client.views;
|
|
316
185
|
const sviews = experiment.server.views;
|
|
317
|
-
expect(cviews.length
|
|
318
|
-
expect(sviews.length
|
|
186
|
+
expect(cviews.length).toEqual(3);
|
|
187
|
+
expect(sviews.length).toEqual(3);
|
|
319
188
|
expect(cviews[0].segment.name).toEqual('Logon');
|
|
320
189
|
expect(cviews[1].segment.name).toEqual('Reject');
|
|
321
190
|
expect(sviews[0].segment.name).toEqual('Logon');
|