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,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FixMsgAsciiStoreRecovery = void 0;
|
|
4
|
-
const buffer_1 = require("../buffer");
|
|
5
|
-
class FixMsgAsciiStoreRecovery {
|
|
6
|
-
constructor(store, config) {
|
|
7
|
-
this.store = store;
|
|
8
|
-
this.config = config;
|
|
9
|
-
}
|
|
10
|
-
getReplayRequest(startSeq, endSeq) {
|
|
11
|
-
const arr = [];
|
|
12
|
-
let seqNum = startSeq;
|
|
13
|
-
let beginGap = 0;
|
|
14
|
-
while (seqNum <= endSeq) {
|
|
15
|
-
const record = this.store.getSeqNum(seqNum);
|
|
16
|
-
if (record !== null) {
|
|
17
|
-
if (beginGap > 0) {
|
|
18
|
-
arr.push(this.gap(beginGap));
|
|
19
|
-
if (seqNum > beginGap) {
|
|
20
|
-
arr.push(this.gap(seqNum));
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
arr.push(this.createMsg(record));
|
|
24
|
-
beginGap = 0;
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
if (beginGap === 0) {
|
|
28
|
-
beginGap = seqNum;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
++seqNum;
|
|
32
|
-
}
|
|
33
|
-
if (beginGap > 0) {
|
|
34
|
-
arr.push(this.gap(beginGap));
|
|
35
|
-
if (seqNum > beginGap) {
|
|
36
|
-
arr.push(this.gap(seqNum));
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return arr;
|
|
40
|
-
}
|
|
41
|
-
createMsg(record) {
|
|
42
|
-
let res = null;
|
|
43
|
-
const parser = new buffer_1.AsciiParser(this.config.definitions, null, this.config.delimiter);
|
|
44
|
-
parser.on('error', (e) => {
|
|
45
|
-
});
|
|
46
|
-
parser.on('msg', (msgType, view) => {
|
|
47
|
-
res = view.toObject();
|
|
48
|
-
});
|
|
49
|
-
parser.on('done', () => {
|
|
50
|
-
res = null;
|
|
51
|
-
});
|
|
52
|
-
parser.parseText(record.text);
|
|
53
|
-
return res;
|
|
54
|
-
}
|
|
55
|
-
gap(newSeq) {
|
|
56
|
-
return this.config.factory.sequenceReset(newSeq);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
exports.FixMsgAsciiStoreRecovery = FixMsgAsciiStoreRecovery;
|
|
60
|
-
//# sourceMappingURL=fix-msg-ascii-store-recovery.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fix-msg-ascii-store-recovery.js","sourceRoot":"","sources":["../../src/store/fix-msg-ascii-store-recovery.ts"],"names":[],"mappings":";;;AAIA,sCAAgD;AAGhD,MAAa,wBAAwB;IACnC,YAA6B,KAAmB,EAAkB,MAAoB;QAAzD,UAAK,GAAL,KAAK,CAAc;QAAkB,WAAM,GAAN,MAAM,CAAc;IACtF,CAAC;IAEM,gBAAgB,CAAE,QAAgB,EAAE,MAAc;QAMvD,MAAM,GAAG,GAAmB,EAAE,CAAA;QAC9B,IAAI,MAAM,GAAG,QAAQ,CAAA;QACrB,IAAI,QAAQ,GAAG,CAAC,CAAA;QAChB,OAAO,MAAM,IAAI,MAAM,EAAE;YACvB,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;YAC3C,IAAI,MAAM,KAAK,IAAI,EAAE;gBACnB,IAAI,QAAQ,GAAG,CAAC,EAAE;oBAChB,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAA;oBAC5B,IAAI,MAAM,GAAG,QAAQ,EAAE;wBACrB,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;qBAC3B;iBACF;gBAED,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAA;gBAChC,QAAQ,GAAG,CAAC,CAAA;aACb;iBAAM;gBAEL,IAAI,QAAQ,KAAK,CAAC,EAAE;oBAClB,QAAQ,GAAG,MAAM,CAAA;iBAClB;aACF;YACD,EAAE,MAAM,CAAA;SACT;QACD,IAAI,QAAQ,GAAG,CAAC,EAAE;YAChB,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAA;YAC5B,IAAI,MAAM,GAAG,QAAQ,EAAE;gBACrB,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;aAC3B;SACF;QACD,OAAO,GAAG,CAAA;IACZ,CAAC;IAEM,SAAS,CAAE,MAA0B;QAC1C,IAAI,GAAG,GAAiB,IAAI,CAAA;QAC5B,MAAM,MAAM,GAAgB,IAAI,oBAAW,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;QACjG,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,CAAQ,EAAE,EAAE;QAEhC,CAAC,CAAC,CAAA;QACF,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,OAAe,EAAE,IAAa,EAAE,EAAE;YAClD,GAAG,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAA;QACvB,CAAC,CAAC,CAAA;QACF,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE;YACrB,GAAG,GAAG,IAAI,CAAA;QACZ,CAAC,CAAC,CAAA;QACF,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;QAC7B,OAAO,GAAG,CAAA;IACZ,CAAC;IAEM,GAAG,CAAE,MAAc;QACxB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CAAA;IAClD,CAAC;CACF;AA7DD,4DA6DC","sourcesContent":["import { IFixMsgStore } from './fix-msg-store'\r\nimport { ILooseObject } from '../collections/collection'\r\nimport { IFixMsgStoreRecord } from './fix-msg-store-record'\r\nimport { StringDuplex } from '../transport'\r\nimport { AsciiParser, MsgView } from '../buffer'\r\nimport { IJsFixConfig } from '../config'\r\n\r\nexport class FixMsgAsciiStoreRecovery {\r\n constructor (public readonly store: IFixMsgStore, public readonly config: IJsFixConfig) {\r\n }\r\n\r\n public getReplayRequest (startSeq: number, endSeq: number): ILooseObject[] {\r\n\r\n // need to cover request from start to end where any missing numbers are\r\n // included as gaps to allow vector of messages to be sent by the session\r\n // on a request\r\n\r\n const arr: ILooseObject[] = []\r\n let seqNum = startSeq\r\n let beginGap = 0\r\n while (seqNum <= endSeq) {\r\n const record = this.store.getSeqNum(seqNum)\r\n if (record !== null) {\r\n if (beginGap > 0) {\r\n arr.push(this.gap(beginGap))\r\n if (seqNum > beginGap) {\r\n arr.push(this.gap(seqNum))\r\n }\r\n }\r\n // we sent an application msg for this seqNum and hence need to recover it from its record\r\n arr.push(this.createMsg(record))\r\n beginGap = 0\r\n } else {\r\n // this was a non saved message such as heartbeat - will be filled with a gap\r\n if (beginGap === 0) {\r\n beginGap = seqNum\r\n }\r\n }\r\n ++seqNum\r\n }\r\n if (beginGap > 0) {\r\n arr.push(this.gap(beginGap))\r\n if (seqNum > beginGap) {\r\n arr.push(this.gap(seqNum))\r\n }\r\n }\r\n return arr\r\n }\r\n\r\n public createMsg (record: IFixMsgStoreRecord): ILooseObject {\r\n let res: ILooseObject = null\r\n const parser: AsciiParser = new AsciiParser(this.config.definitions, null, this.config.delimiter)\r\n parser.on('error', (e: Error) => {\r\n // log we failed to parse\r\n })\r\n parser.on('msg', (msgType: string, view: MsgView) => {\r\n res = view.toObject()\r\n })\r\n parser.on('done', () => {\r\n res = null\r\n })\r\n parser.parseText(record.text)\r\n return res\r\n }\r\n\r\n public gap (newSeq: number): ILooseObject {\r\n return this.config.factory.sequenceReset(newSeq)\r\n }\r\n}\r\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { IFixMsgStore } from './fix-msg-store';
|
|
2
|
-
import { IFixMsgStoreRecord } from './fix-msg-store-record';
|
|
3
|
-
import { IJsFixConfig } from '../config';
|
|
4
|
-
import { IFixReplayRecord } from './fix-replay-record';
|
|
5
|
-
export declare class FixMsgAsciiStoreReplay {
|
|
6
|
-
readonly store: IFixMsgStore;
|
|
7
|
-
readonly config: IJsFixConfig;
|
|
8
|
-
constructor(store: IFixMsgStore, config: IJsFixConfig);
|
|
9
|
-
getReplayRequest(startSeq: number, endSeq: number): IFixReplayRecord[];
|
|
10
|
-
createMsg(record: IFixMsgStoreRecord): IFixReplayRecord;
|
|
11
|
-
gap(beginGap: number, seqNum: number, arr: IFixReplayRecord[]): void;
|
|
12
|
-
sequenceReset(newSeq: number): IFixReplayRecord;
|
|
13
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FixMsgAsciiStoreReplay = void 0;
|
|
4
|
-
const buffer_1 = require("../buffer");
|
|
5
|
-
const fix_replay_record_1 = require("./fix-replay-record");
|
|
6
|
-
const types_1 = require("../types");
|
|
7
|
-
class FixMsgAsciiStoreReplay {
|
|
8
|
-
constructor(store, config) {
|
|
9
|
-
this.store = store;
|
|
10
|
-
this.config = config;
|
|
11
|
-
}
|
|
12
|
-
getReplayRequest(startSeq, endSeq) {
|
|
13
|
-
const arr = [];
|
|
14
|
-
let seqNum = startSeq;
|
|
15
|
-
let beginGap = 0;
|
|
16
|
-
while (seqNum <= endSeq) {
|
|
17
|
-
const record = this.store.getSeqNum(seqNum);
|
|
18
|
-
if (record !== null) {
|
|
19
|
-
this.gap(beginGap, seqNum, arr);
|
|
20
|
-
arr.push(this.createMsg(record));
|
|
21
|
-
beginGap = 0;
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
if (beginGap === 0) {
|
|
25
|
-
beginGap = seqNum;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
++seqNum;
|
|
29
|
-
}
|
|
30
|
-
this.gap(beginGap, seqNum, arr);
|
|
31
|
-
return arr;
|
|
32
|
-
}
|
|
33
|
-
createMsg(record) {
|
|
34
|
-
let res = null;
|
|
35
|
-
const parser = new buffer_1.AsciiParser(this.config.definitions, null, this.config.delimiter);
|
|
36
|
-
parser.on('error', (e) => {
|
|
37
|
-
});
|
|
38
|
-
parser.on('msg', (msgType, view) => {
|
|
39
|
-
res = view.toObject();
|
|
40
|
-
});
|
|
41
|
-
parser.on('done', () => {
|
|
42
|
-
res = null;
|
|
43
|
-
});
|
|
44
|
-
parser.parseText(record.text);
|
|
45
|
-
return new fix_replay_record_1.FixReplayRecord(res, record.msgType, record.seqNum);
|
|
46
|
-
}
|
|
47
|
-
gap(beginGap, seqNum, arr) {
|
|
48
|
-
if (beginGap > 0) {
|
|
49
|
-
arr.push(this.sequenceReset(beginGap));
|
|
50
|
-
if (seqNum > beginGap) {
|
|
51
|
-
arr.push(this.sequenceReset(seqNum));
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
sequenceReset(newSeq) {
|
|
56
|
-
return new fix_replay_record_1.FixReplayRecord(this.config.factory.sequenceReset(newSeq), types_1.MsgType.SequenceReset, newSeq);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
exports.FixMsgAsciiStoreReplay = FixMsgAsciiStoreReplay;
|
|
60
|
-
//# sourceMappingURL=fix-msg-ascii-store-replay.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fix-msg-ascii-store-replay.js","sourceRoot":"","sources":["../../src/store/fix-msg-ascii-store-replay.ts"],"names":[],"mappings":";;;AAGA,sCAAgD;AAEhD,2DAAuE;AACvE,oCAAkC;AAElC,MAAa,sBAAsB;IACjC,YAA6B,KAAmB,EAAkB,MAAoB;QAAzD,UAAK,GAAL,KAAK,CAAc;QAAkB,WAAM,GAAN,MAAM,CAAc;IACtF,CAAC;IAEM,gBAAgB,CAAE,QAAgB,EAAE,MAAc;QAMvD,MAAM,GAAG,GAAuB,EAAE,CAAA;QAClC,IAAI,MAAM,GAAG,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AC7B,OAAO,IAAI,mCAAe,CAAC,GAAG,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;IAChE,CAAC;IAEM,GAAG,CAAE,QAAgB,EAAE,MAAc,EAAE,GAAuB;QACnE,IAAI,QAAQ,GAAG,CAAC,EAAE;YAChB,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAA;YACtC,IAAI,MAAM,GAAG,QAAQ,EAAE;gBACrB,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAA;aACrC;SACF;IACH,CAAC;IAEM,aAAa,CAAE,MAAc;QAClC,OAAO,IAAI,mCAAe,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,eAAO,CAAC,aAAa,EAAE,MAAM,CAAC,CAAA;IACtG,CAAC;CACF;AA5DD,wDA4DC","sourcesContent":["import { IFixMsgStore } from './fix-msg-store'\r\nimport { ILooseObject } from '../collections/collection'\r\nimport { IFixMsgStoreRecord } from './fix-msg-store-record'\r\nimport { AsciiParser, MsgView } from '../buffer'\r\nimport { IJsFixConfig } from '../config'\r\nimport { IFixReplayRecord, FixReplayRecord } from './fix-replay-record'\r\nimport { MsgType } from '../types'\r\n\r\nexport class FixMsgAsciiStoreReplay {\r\n constructor (public readonly store: IFixMsgStore, public readonly config: IJsFixConfig) {\r\n }\r\n\r\n public getReplayRequest (startSeq: number, endSeq: number): IFixReplayRecord[] {\r\n\r\n // need to cover request from start to end where any missing numbers are\r\n // included as gaps to allow vector of messages to be sent by the session\r\n // on a request\r\n\r\n const arr: IFixReplayRecord[] = []\r\n let seqNum = startSeq\r\n let beginGap = 0\r\n while (seqNum <= endSeq) {\r\n const record = this.store.getSeqNum(seqNum)\r\n if (record !== null) {\r\n this.gap(beginGap, seqNum, arr)\r\n // we sent an application msg for this seqNum and hence need to recover it from its record\r\n arr.push(this.createMsg(record))\r\n beginGap = 0\r\n } else {\r\n // this was a non saved message such as heartbeat - will be filled with a gap\r\n if (beginGap === 0) {\r\n beginGap = seqNum\r\n }\r\n }\r\n ++seqNum\r\n }\r\n this.gap(beginGap, seqNum, arr)\r\n return arr\r\n }\r\n\r\n public createMsg (record: IFixMsgStoreRecord): IFixReplayRecord {\r\n let res: ILooseObject = null\r\n const parser: AsciiParser = new AsciiParser(this.config.definitions, null, this.config.delimiter)\r\n parser.on('error', (e: Error) => {\r\n // log we failed to parse\r\n })\r\n parser.on('msg', (msgType: string, view: MsgView) => {\r\n res = view.toObject()\r\n })\r\n parser.on('done', () => {\r\n res = null\r\n })\r\n parser.parseText(record.text)\r\n return new FixReplayRecord(res, record.msgType, record.seqNum)\r\n }\r\n\r\n public gap (beginGap: number, seqNum: number, arr: IFixReplayRecord[]) {\r\n if (beginGap > 0) {\r\n arr.push(this.sequenceReset(beginGap))\r\n if (seqNum > beginGap) {\r\n arr.push(this.sequenceReset(seqNum))\r\n }\r\n }\r\n }\r\n\r\n public sequenceReset (newSeq: number): IFixReplayRecord {\r\n return new FixReplayRecord(this.config.factory.sequenceReset(newSeq), MsgType.SequenceReset, newSeq)\r\n }\r\n}\r\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ILooseObject } from '../collections/collection';
|
|
2
|
-
export interface IFixReplayRecord {
|
|
3
|
-
readonly object: ILooseObject;
|
|
4
|
-
readonly msgType: string;
|
|
5
|
-
readonly seqNum: number;
|
|
6
|
-
}
|
|
7
|
-
export declare class FixReplayRecord implements IFixReplayRecord {
|
|
8
|
-
readonly object: ILooseObject;
|
|
9
|
-
readonly msgType: string;
|
|
10
|
-
readonly seqNum: number;
|
|
11
|
-
constructor(object: ILooseObject, msgType: string, seqNum: number);
|
|
12
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FixReplayRecord = void 0;
|
|
4
|
-
class FixReplayRecord {
|
|
5
|
-
constructor(object, msgType, seqNum) {
|
|
6
|
-
this.object = object;
|
|
7
|
-
this.msgType = msgType;
|
|
8
|
-
this.seqNum = seqNum;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
exports.FixReplayRecord = FixReplayRecord;
|
|
12
|
-
//# sourceMappingURL=fix-replay-record.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fix-replay-record.js","sourceRoot":"","sources":["../../src/store/fix-replay-record.ts"],"names":[],"mappings":";;;AAQA,MAAa,eAAe;IAC1B,YAA6B,MAAoB,EACpB,OAAe,EACf,MAAc;QAFd,WAAM,GAAN,MAAM,CAAc;QACpB,YAAO,GAAP,OAAO,CAAQ;QACf,WAAM,GAAN,MAAM,CAAQ;IAC3C,CAAC;CACF;AALD,0CAKC","sourcesContent":["import { ILooseObject } from '../collections/collection'\r\n\r\nexport interface IFixReplayRecord {\r\n readonly object: ILooseObject\r\n readonly msgType: string\r\n readonly seqNum: number\r\n}\r\n\r\nexport class FixReplayRecord implements IFixReplayRecord {\r\n constructor (public readonly object: ILooseObject,\r\n public readonly msgType: string,\r\n public readonly seqNum: number) {\r\n }\r\n}\r\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ILooseObject } from '../collections/collection';
|
|
2
|
-
export interface IFixResendRecord {
|
|
3
|
-
readonly object: ILooseObject;
|
|
4
|
-
readonly msgType: string;
|
|
5
|
-
readonly seqNum: number;
|
|
6
|
-
}
|
|
7
|
-
export declare class FixResendRecord implements IFixResendRecord {
|
|
8
|
-
readonly object: ILooseObject;
|
|
9
|
-
readonly msgType: string;
|
|
10
|
-
readonly seqNum: number;
|
|
11
|
-
constructor(object: ILooseObject, msgType: string, seqNum: number);
|
|
12
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FixResendRecord = void 0;
|
|
4
|
-
class FixResendRecord {
|
|
5
|
-
constructor(object, msgType, seqNum) {
|
|
6
|
-
this.object = object;
|
|
7
|
-
this.msgType = msgType;
|
|
8
|
-
this.seqNum = seqNum;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
exports.FixResendRecord = FixResendRecord;
|
|
12
|
-
//# sourceMappingURL=fix-resend-record.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fix-resend-record.js","sourceRoot":"","sources":["../../src/store/fix-resend-record.ts"],"names":[],"mappings":";;;AAQA,MAAa,eAAe;IAC1B,YAA6B,MAAoB,EACpB,OAAe,EACf,MAAc;QAFd,WAAM,GAAN,MAAM,CAAc;QACpB,YAAO,GAAP,OAAO,CAAQ;QACf,WAAM,GAAN,MAAM,CAAQ;IAC3C,CAAC;CACF;AALD,0CAKC","sourcesContent":["import { ILooseObject } from '../collections/collection'\r\n\r\nexport interface IFixResendRecord {\r\n readonly object: ILooseObject\r\n readonly msgType: string\r\n readonly seqNum: number\r\n}\r\n\r\nexport class FixResendRecord implements IFixResendRecord {\r\n constructor (public readonly object: ILooseObject,\r\n public readonly msgType: string,\r\n public readonly seqNum: number) {\r\n }\r\n}\r\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"replay-record.js","sourceRoot":"","sources":["../../src/store/replay-record.ts"],"names":[],"mappings":"","sourcesContent":["import { ILooseObject } from '../collections/collection'\r\nimport { IFixMsgStoreRecord } from './fix-msg-store-record'\r\n\r\nexport interface IStoreReplayRecord {\r\n readonly object: ILooseObject\r\n readonly storeRecord: IFixMsgStoreRecord\r\n}\r\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ILooseObject } from '../collections/collection';
|
|
2
|
-
export interface IStoreReplayRecord {
|
|
3
|
-
readonly object: ILooseObject;
|
|
4
|
-
readonly msgType: string;
|
|
5
|
-
readonly seqNum: number;
|
|
6
|
-
}
|
|
7
|
-
export declare class StoreReplayRecord implements IStoreReplayRecord {
|
|
8
|
-
readonly object: ILooseObject;
|
|
9
|
-
readonly msgType: string;
|
|
10
|
-
readonly seqNum: number;
|
|
11
|
-
constructor(object: ILooseObject, msgType: string, seqNum: number);
|
|
12
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StoreReplayRecord = void 0;
|
|
4
|
-
class StoreReplayRecord {
|
|
5
|
-
constructor(object, msgType, seqNum) {
|
|
6
|
-
this.object = object;
|
|
7
|
-
this.msgType = msgType;
|
|
8
|
-
this.seqNum = seqNum;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
exports.StoreReplayRecord = StoreReplayRecord;
|
|
12
|
-
//# sourceMappingURL=store-replay-record.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"store-replay-record.js","sourceRoot":"","sources":["../../src/store/store-replay-record.ts"],"names":[],"mappings":";;;AAQA,MAAa,iBAAiB;IAC5B,YAA6B,MAAoB,EACpB,OAAe,EACf,MAAc;QAFd,WAAM,GAAN,MAAM,CAAc;QACpB,YAAO,GAAP,OAAO,CAAQ;QACf,WAAM,GAAN,MAAM,CAAQ;IAC3C,CAAC;CACF;AALD,8CAKC","sourcesContent":["import { ILooseObject } from '../collections/collection'\r\n\r\nexport interface IStoreReplayRecord {\r\n readonly object: ILooseObject\r\n readonly msgType: string\r\n readonly seqNum: number\r\n}\r\n\r\nexport class StoreReplayRecord implements IStoreReplayRecord {\r\n constructor (public readonly object: ILooseObject,\r\n public readonly msgType: string,\r\n public readonly seqNum: number) {\r\n }\r\n}\r\n"]}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { ITcpTransportDescription } from '../session-description';
|
|
3
|
-
import { ConnectionOptions, TlsOptions } from 'tls';
|
|
4
|
-
export declare function getTlsOptions(tcp: ITcpTransportDescription): TlsOptions;
|
|
5
|
-
export declare function getTlsConnectionOptions(tcp: ITcpTransportDescription): ConnectionOptions;
|
package/dist/tcp/tls-options.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getTlsConnectionOptions = exports.getTlsOptions = void 0;
|
|
4
|
-
const path = require('path');
|
|
5
|
-
const fs = require('fs');
|
|
6
|
-
function read(filePath) {
|
|
7
|
-
const root = path.join(__dirname, '../../../');
|
|
8
|
-
const fullPath = path.join(root, filePath);
|
|
9
|
-
return fs.readFileSync(fullPath, {
|
|
10
|
-
encoding: 'utf8', flag: 'r'
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
function getTlsOptions(tcp) {
|
|
14
|
-
let tlsOptions = null;
|
|
15
|
-
if (tcp.key) {
|
|
16
|
-
tlsOptions = {
|
|
17
|
-
key: read(tcp.key),
|
|
18
|
-
cert: read(tcp.cert),
|
|
19
|
-
requestCert: tcp.requestCert,
|
|
20
|
-
rejectUnauthorized: tcp.rejectUnauthorized
|
|
21
|
-
};
|
|
22
|
-
if (tcp.ca && tcp.ca.length > 0) {
|
|
23
|
-
tlsOptions.ca = tcp.ca.map(i => read(i));
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
return tlsOptions;
|
|
27
|
-
}
|
|
28
|
-
exports.getTlsOptions = getTlsOptions;
|
|
29
|
-
function getTlsConnectionOptions(tcp) {
|
|
30
|
-
let connectionOptions = null;
|
|
31
|
-
if (tcp.key) {
|
|
32
|
-
connectionOptions = {
|
|
33
|
-
port: tcp.port,
|
|
34
|
-
host: tcp.host,
|
|
35
|
-
key: read(tcp.key),
|
|
36
|
-
cert: read(tcp.cert)
|
|
37
|
-
};
|
|
38
|
-
if (tcp.ca && tcp.ca.length > 0) {
|
|
39
|
-
connectionOptions.ca = tcp.ca.map(i => read(i));
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return connectionOptions;
|
|
43
|
-
}
|
|
44
|
-
exports.getTlsConnectionOptions = getTlsConnectionOptions;
|
|
45
|
-
//# sourceMappingURL=tls-options.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tls-options.js","sourceRoot":"","sources":["../../src/transport/tcp/tls-options.ts"],"names":[],"mappings":";;;AAEA,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAC5B,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;AAExB,SAAS,IAAI,CAAE,QAAgB;IAC7B,MAAM,IAAI,GAAW,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,CAAA;IACtD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;IAC1C,OAAO,EAAE,CAAC,YAAY,CAAC,QAAQ,EAC7B;QACE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG;KAC5B,CAAC,CAAA;AACN,CAAC;AAED,SAAgB,aAAa,CAAE,GAA6B;IAC1D,IAAI,UAAU,GAAe,IAAI,CAAA;IACjC,IAAI,GAAG,CAAC,GAAG,EAAE;QACX,UAAU,GAAG;YACX,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;YAClB,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;YACpB,WAAW,EAAE,GAAG,CAAC,WAAW;YAC5B,kBAAkB,EAAE,GAAG,CAAC,kBAAkB;SAC7B,CAAA;QACf,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE;YAC/B,UAAU,CAAC,EAAE,GAAG,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;SACzC;KACF;IACD,OAAO,UAAU,CAAA;AACnB,CAAC;AAdD,sCAcC;AAED,SAAgB,uBAAuB,CAAE,GAA6B;IACpE,IAAI,iBAAiB,GAAsB,IAAI,CAAA;IAC/C,IAAI,GAAG,CAAC,GAAG,EAAE;QACX,iBAAiB,GAAG;YAClB,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;YAClB,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;SACA,CAAA;QACtB,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE;YAC/B,iBAAiB,CAAC,EAAE,GAAG,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;SAChD;KACF;IACD,OAAO,iBAAiB,CAAA;AAC1B,CAAC;AAdD,0DAcC","sourcesContent":["import { ITcpTransportDescription } from '../session-description'\r\nimport { ConnectionOptions, TlsOptions} from 'tls'\r\nconst path = require('path')\r\nconst fs = require('fs')\r\n\r\nfunction read (filePath: string) {\r\n const root: string = path.join(__dirname, '../../../')\r\n const fullPath = path.join(root, filePath)\r\n return fs.readFileSync(fullPath,\r\n {\r\n encoding: 'utf8', flag: 'r'\r\n })\r\n}\r\n\r\nexport function getTlsOptions (tcp: ITcpTransportDescription): TlsOptions {\r\n let tlsOptions: TlsOptions = null\r\n if (tcp.key) {\r\n tlsOptions = {\r\n key: read(tcp.key),\r\n cert: read(tcp.cert),\r\n requestCert: tcp.requestCert,\r\n rejectUnauthorized: tcp.rejectUnauthorized\r\n } as TlsOptions\r\n if (tcp.ca && tcp.ca.length > 0) {\r\n tlsOptions.ca = tcp.ca.map(i => read(i))\r\n }\r\n }\r\n return tlsOptions\r\n}\r\n\r\nexport function getTlsConnectionOptions (tcp: ITcpTransportDescription): ConnectionOptions {\r\n let connectionOptions: ConnectionOptions = null\r\n if (tcp.key) {\r\n connectionOptions = {\r\n port: tcp.port,\r\n host: tcp.host,\r\n key: read(tcp.key),\r\n cert: read(tcp.cert)\r\n } as ConnectionOptions\r\n if (tcp.ca && tcp.ca.length > 0) {\r\n connectionOptions.ca = tcp.ca.map(i => read(i))\r\n }\r\n }\r\n return connectionOptions\r\n}\r\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ascii-encode.test.js","sourceRoot":"","sources":["../../src/test/ascii-encode.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,6BAA4B;AAE5B,sCAA+F;AAE/F,4CAAwG;AACxG,sCAAuC;AACvC,kCAAwC;AAExC,MAAM,IAAI,GAAW,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,CAAA;AAEvD,IAAI,WAA2B,CAAA;AAC/B,IAAI,OAA4B,CAAA;AAChC,IAAI,OAAqB,CAAA;AACzB,IAAI,GAAsB,CAAA;AAC1B,IAAI,EAAqB,CAAA;AAEzB,MAAM,SAAS,GAAS,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;AAC7C,MAAM,YAAY,GAAS,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,CAAA;AAC1E,MAAM,OAAO,GAAS,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AACjE,MAAM,OAAO,GAAS,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,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AC,CAAA;AAC1E,CAAC,CAAC,CAAA","sourcesContent":["import * as path from 'path'\r\nimport { ComponentFieldDefinition, ContainedFieldSet, FixDefinitions, MessageDefinition } from '../dictionary'\r\nimport { AsciiChars, AsciiEncoder, AsciiParser, MsgView, Tags, TimeFormatter } from '../buffer'\r\nimport { ILooseObject } from '../collections/collection'\r\nimport { AsciiMsgTransmitter, ISessionDescription, SessionMsgFactory, StringDuplex } from '../transport'\r\nimport { JsFixConfig } from '../config'\r\nimport { getDefinitions } from '../util'\r\n\r\nconst root: string = path.join(__dirname, '../../data')\r\n\r\nlet definitions: FixDefinitions\r\nlet session: AsciiMsgTransmitter\r\nlet encoder: AsciiEncoder\r\nlet nos: MessageDefinition\r\nlet er: MessageDefinition\r\n\r\nconst localDate: Date = new Date(2018, 6, 25)\r\nconst utcTimeStamp: Date = new Date(Date.UTC(2018, 5, 10, 16, 35, 0, 246))\r\nconst utcDate: Date = new Date(Date.UTC(2018, 5, 10, 0, 0, 0, 0))\r\nconst utcTime: Date = new Date(Date.UTC(2018, 0, 1, 16, 35, 0, 246))\r\n\r\nbeforeAll(async () => {\r\n const sessionDescription: ISessionDescription = require(path.join(root, 'session/qf-fix44.json'))\r\n definitions = await getDefinitions(sessionDescription.application.dictionary)\r\n const config = new JsFixConfig(new SessionMsgFactory(sessionDescription), definitions, sessionDescription, AsciiChars.Pipe)\r\n session = new AsciiMsgTransmitter(config)\r\n encoder = new AsciiEncoder(session.buffer, definitions, new TimeFormatter(session.buffer), AsciiChars.Pipe)\r\n nos = definitions.message.get('NewOrderSingle')\r\n er = definitions.message.get('ExecutionReport')\r\n}, 45000)\r\n\r\ntest('expect a definition ', () => {\r\n expect(nos).toBeTruthy()\r\n})\r\n\r\nfunction toFix (o: ILooseObject, set?: ContainedFieldSet, enc?: AsciiEncoder): string {\r\n const theEncode = enc ? enc : encoder\r\n session.buffer.reset()\r\n if (set) {\r\n theEncode.encode(o, set.name)\r\n } else {\r\n theEncode.encode(o, nos.name)\r\n }\r\n return session.buffer.toString()\r\n}\r\n\r\nfunction toFixMessage (o: ILooseObject, msg: MessageDefinition): string {\r\n session.encodeMessage(msg.msgType, o)\r\n return session.buffer.toString()\r\n}\r\n\r\nclass ParsingResult {\r\n constructor (public readonly event: string, public readonly msgType: string, public readonly view: MsgView,\r\n public readonly contents: string, public readonly parser: AsciiParser) {\r\n }\r\n}\r\n\r\nfunction toParse (text: string, chunks: boolean = false): Promise<ParsingResult> {\r\n return new Promise<any>((resolve, reject) => {\r\n const parser = new AsciiParser(definitions, new StringDuplex(text, chunks).readable, AsciiChars.Pipe)\r\n parser.on('error', (e: Error) => {\r\n reject(e)\r\n })\r\n parser.on('msg', (msgType: string, view: MsgView) => {\r\n resolve(new ParsingResult('msg', msgType, view.clone(), parser.state.elasticBuffer.toString(), parser))\r\n })\r\n parser.on('done', () => {\r\n resolve(new ParsingResult('done', null,null, parser.state.elasticBuffer.toString(), parser))\r\n })\r\n })\r\n}\r\n\r\ntest('encode heartbeat', async () => {\r\n const factory = session.config.factory\r\n const hb = factory.heartbeat('test01')\r\n const hbd = definitions.message.get('Heartbeat')\r\n const fix = toFixMessage(hb, hbd)\r\n expect(fix).toBeTruthy()\r\n const res: ParsingResult = await toParse(fix)\r\n expect(res.event).toEqual('msg')\r\n expect(res.msgType).toEqual('0')\r\n const len = res.view.getTyped(Tags.BodyLengthTag)\r\n const expected = fix.length - '8=FIX4.4|9=0000081|'.length - '10=159|'.length\r\n expect(len).toEqual(expected)\r\n})\r\n\r\ntest('encode custom header PossDupFlag', () => {\r\n const no: ILooseObject = {\r\n StandardHeader: {\r\n PossDupFlag: true\r\n }\r\n }\r\n const fix: string = toFixMessage(no, definitions.message.get('Heartbeat'))\r\n expect(fix).toMatch('43=Y|')\r\n})\r\n\r\ntest('encode custom header PossDupFlag', () => {\r\n const no: ILooseObject = {\r\n StandardHeader: {\r\n MsgSeqNum: 9999\r\n }\r\n }\r\n const fix: string = toFixMessage(no, definitions.message.get('Heartbeat'))\r\n expect(fix).toMatch('34=9999|')\r\n})\r\n\r\ntest('encode string ClOrdID ', () => {\r\n const no: ILooseObject = {}\r\n no.ClOrdID = 'Order-a'\r\n const fix: string = toFix(no)\r\n expect(fix).toEqual('11=Order-a|')\r\n})\r\n\r\ntest('encode empty string', () => {\r\n const no: ILooseObject = {}\r\n no.ClOrdID = ''\r\n const fix: string = toFix(no)\r\n expect(fix).toEqual('11=|')\r\n})\r\n\r\ntest('encode null string', () => {\r\n const no: ILooseObject = {}\r\n no.ClOrdID = null\r\n const fix: string = toFix(no)\r\n expect(fix).toEqual('')\r\n})\r\n\r\ntest('encode +ve numeric (int) Price ', () => {\r\n const no: ILooseObject = {}\r\n no.Price = 100\r\n const fix: string = toFix(no)\r\n expect(fix).toEqual('44=100|')\r\n})\r\n\r\ntest('encode -ve numeric (int) Price ', () => {\r\n const no: ILooseObject = {}\r\n no.Price = -100\r\n const fix: string = toFix(no)\r\n expect(fix).toEqual('44=-100|')\r\n})\r\n\r\ntest('encode +ve numeric (double 8dp) Price ', () => {\r\n const no: ILooseObject = {}\r\n no.Price = 123.12345678\r\n const fix: string = toFix(no)\r\n expect(fix).toEqual('44=123.12345678|')\r\n})\r\n\r\ntest('encode +ve numeric (double 14dp) Price ', () => {\r\n const no: ILooseObject = {}\r\n no.Price = 123.12345678901234\r\n const fix: string = toFix(no)\r\n expect(fix).toEqual('44=123.12345678901234|')\r\n})\r\n\r\ntest('encode -ve numeric (double 14dp) Price ', () => {\r\n const no: ILooseObject = {}\r\n no.Price = -123.12345678901234\r\n const fix: string = toFix(no)\r\n expect(fix).toEqual('44=-123.12345678901234|')\r\n})\r\n\r\ntest('encode +ve string Price ', () => {\r\n const no: ILooseObject = {}\r\n no.Price = '123.12345678901234'\r\n const fix: string = toFix(no)\r\n expect(fix).toEqual('44=123.12345678901234|')\r\n})\r\n\r\ntest('encode LocalDate TradeDate ', () => {\r\n const no: ILooseObject = {}\r\n no.TradeDate = localDate\r\n const fix: string = toFix(no)\r\n expect(fix).toEqual('75=20180725|')\r\n})\r\n\r\ntest('encode UTCTIMESTAMP ExpireTime ', () => {\r\n const no: ILooseObject = {}\r\n no.ExpireTime = utcTimeStamp\r\n const fix: string = toFix(no)\r\n expect(fix).toEqual('126=20180610-16:35:00.246|')\r\n})\r\n\r\ntest('encode UTCTIMESTAMP ExpireTime - check padding', () => {\r\n const no: ILooseObject = {}\r\n no.ExpireTime = new Date(Date.UTC(2018, 0, 1, 0, 0, 0, 1))\r\n const fix: string = toFix(no)\r\n expect(fix).toEqual('126=20180101-00:00:00.001|')\r\n})\r\n\r\ntest('encode UTCDATEONLY MDEntryDate', () => {\r\n const mdGrp: ComponentFieldDefinition = definitions.component.get('MDFullGrp')\r\n expect(mdGrp).toBeTruthy()\r\n const grp: ILooseObject = {\r\n NoMDEntries: [\r\n {\r\n MDEntryType: '0',\r\n MDEntryDate: utcDate\r\n }\r\n ]\r\n }\r\n const fix: string = toFix(grp, mdGrp)\r\n expect(fix).toEqual('268=1|269=0|272=20180610|')\r\n})\r\n\r\ntest('encode UTCTIMEONLY MDEntryTime', () => {\r\n const mdGrp: ComponentFieldDefinition = definitions.component.get('MDFullGrp')\r\n expect(mdGrp).toBeTruthy()\r\n const grp: ILooseObject = {\r\n NoMDEntries: [\r\n {\r\n MDEntryType: '0',\r\n MDEntryTime: utcTime\r\n }\r\n ]\r\n }\r\n const fix: string = toFix(grp, mdGrp)\r\n expect(fix).toEqual('268=1|269=0|273=16:35:00.246|')\r\n})\r\n\r\ntest('encode BOOLEAN (true) ReportToExch', () => {\r\n expect(er).toBeTruthy()\r\n const e: ILooseObject = {}\r\n e.ReportToExch = true\r\n const fix: string = toFix(e, er)\r\n expect(fix).toEqual('113=Y|')\r\n})\r\n\r\ntest('encode BOOLEAN (truthy) ReportToExch', () => {\r\n expect(er).toBeTruthy()\r\n const e: ILooseObject = {}\r\n e.ReportToExch = 1\r\n const fix: string = toFix(e, er)\r\n expect(fix).toEqual('113=Y|')\r\n})\r\n\r\ntest('encode BOOLEAN (string) ReportToExch', () => {\r\n expect(er).toBeTruthy()\r\n const e: ILooseObject = {}\r\n e.ReportToExch = 'TRUE'\r\n const fix: string = toFix(e, er)\r\n expect(fix).toEqual('113=Y|')\r\n})\r\n\r\ntest('encode BOOLEAN (false) ReportToExch', () => {\r\n expect(er).toBeTruthy()\r\n const e: ILooseObject = {}\r\n e.ReportToExch = false\r\n const fix: string = toFix(e, er)\r\n expect(fix).toEqual('113=N|')\r\n})\r\n\r\ntest('encode BOOLEAN (falsy) ReportToExch', () => {\r\n expect(er).toBeTruthy()\r\n const e: ILooseObject = {}\r\n e.ReportToExch = 0\r\n const fix: string = toFix(e, er)\r\n expect(fix).toEqual('113=N|')\r\n})\r\n\r\ntest('encode RawData EncodedText', () => {\r\n expect(er).toBeTruthy()\r\n const toEncode: string = 'this is fix'\r\n const e: ILooseObject = {\r\n EncodedText: Buffer.alloc(toEncode.length, toEncode, 'utf8')\r\n }\r\n const fix: string = toFix(e, er)\r\n expect(fix).toEqual('354=11|355=this is fix|')\r\n})\r\n\r\ntest('encode empty RawData EncodedText', () => {\r\n expect(er).toBeTruthy()\r\n const toEncode: string = ''\r\n const e: ILooseObject = {\r\n EncodedText: Buffer.alloc(toEncode.length, toEncode, 'utf8')\r\n }\r\n const fix: string = toFix(e, er)\r\n expect(fix).toEqual('354=0|355=|')\r\n})\r\n\r\nfunction getParties (): ILooseObject {\r\n return {\r\n 'Parties': {\r\n 'NoPartyIDs': [\r\n {\r\n 'PartyID': 'magna.',\r\n 'PartyIDSource': '9',\r\n 'PartyRole': 28\r\n },\r\n {\r\n 'PartyID': 'iaculis',\r\n 'PartyIDSource': 'F',\r\n 'PartyRole': 2\r\n }]\r\n }\r\n }\r\n}\r\n\r\nfunction getPartiesNoDelimiter (): ILooseObject {\r\n return {\r\n 'Parties': {\r\n 'NoPartyIDs': [\r\n {\r\n // missing PartyID\r\n 'PartyIDSource': '9',\r\n 'PartyRole': 28\r\n }\r\n ]\r\n }\r\n }\r\n}\r\n\r\ntest('encode repeated group of simple repository Parties', () => {\r\n expect(er).toBeTruthy()\r\n const e: ILooseObject = getParties()\r\n const fix: string = toFix(e, er)\r\n expect(fix).toEqual('453=2|448=magna.|447=9|452=28|448=iaculis|447=F|452=2|')\r\n})\r\n\r\ntest('use a carat as log delimiter', () => {\r\n expect(er).toBeTruthy()\r\n const caratEncoder = new AsciiEncoder(session.buffer, definitions, new TimeFormatter(session.buffer), AsciiChars.Soh, AsciiChars.Carat)\r\n const e: ILooseObject = getParties()\r\n const fix: string = toFix(e, er, caratEncoder)\r\n expect(fix).toEqual('453=2^448=magna.^447=9^452=28^448=iaculis^447=F^452=2^')\r\n})\r\n\r\ntest('use a carat as log delimiter with Soh in buffer to show encoding still works', () => {\r\n expect(er).toBeTruthy()\r\n const caratEncoder = new AsciiEncoder(session.buffer, definitions, new TimeFormatter(session.buffer), AsciiChars.Soh, AsciiChars.Carat)\r\n const e: ILooseObject = getParties()\r\n const fix: string = toFix(e, er, caratEncoder)\r\n expect(fix).toEqual('453=2^448=magna.^447=9^452=28^448=iaculis^447=F^452=2^')\r\n const trimmed = caratEncoder.trim().toString()\r\n expect(trimmed).toEqual('453=2\u0001448=magna.\u0001447=9\u0001452=28\u0001448=iaculis\u0001447=F\u0001452=2\u0001')\r\n})\r\n\r\ntest('encode repeated group with no delimiter - should throw', () => {\r\n expect(er).toBeTruthy()\r\n const e: ILooseObject = getPartiesNoDelimiter()\r\n function run (): void {\r\n toFix(e, er)\r\n }\r\n expect(run).toThrow(/no delimiter/)\r\n})\r\n\r\ntest('encode repeated group with no array - should throw', () => {\r\n expect(er).toBeTruthy()\r\n const e: ILooseObject = {\r\n 'Parties': {\r\n 'NoPartyIDs': 'should be an array'\r\n }\r\n }\r\n function run (): void {\r\n toFix(e, er)\r\n }\r\n expect(run).toThrow(/expected array/)\r\n})\r\n\r\ntest('encode repeated group with empty array', () => {\r\n expect(er).toBeTruthy()\r\n const e: ILooseObject = {\r\n 'Parties': {\r\n 'NoPartyIDs': []\r\n }\r\n }\r\n expect(toFix(e, er)).toEqual('453=0|')\r\n})\r\n\r\nfunction getInstrument (): ILooseObject {\r\n return {\r\n 'Instrument': {\r\n 'Symbol': 'ac,',\r\n 'SymbolSfx': 'non',\r\n 'SecurityID': 'Pellentesque',\r\n 'SecurityIDSource': 'B',\r\n 'Product': 2\r\n }\r\n }\r\n}\r\n\r\nfunction getInstrumentNestedGroup (): ILooseObject {\r\n return {\r\n 'Instrument': {\r\n 'Symbol': 'ac,',\r\n 'SymbolSfx': 'non',\r\n 'SecurityID': 'Pellentesque',\r\n 'SecurityIDSource': 'B',\r\n 'SecAltIDGrp': {\r\n 'NoSecurityAltID': [\r\n {\r\n 'SecurityAltID': 'lorem',\r\n 'SecurityAltIDSource': 'consequat'\r\n },\r\n {\r\n 'SecurityAltID': 'sapien',\r\n 'SecurityAltIDSource': 'tempor'\r\n }\r\n ]\r\n },\r\n 'Product': 2\r\n }\r\n }\r\n}\r\n\r\ntest('encode component', () => {\r\n expect(er).toBeTruthy()\r\n const e: ILooseObject = getInstrument()\r\n expect(toFix(e, er)).toEqual('55=ac,|65=non|48=Pellentesque|22=B|460=2|')\r\n})\r\n\r\ntest('encode component nested group', () => {\r\n expect(er).toBeTruthy()\r\n const e: ILooseObject = getInstrumentNestedGroup()\r\n expect(toFix(e, er)).toEqual('55=ac,|65=non|48=Pellentesque|22=B|454=2|455=lorem|456=consequat|455=sapien|456=tempor|460=2|')\r\n})\r\n\r\ntest('encode group missing delimiter', () => {\r\n expect(er).toBeTruthy()\r\n const e: ILooseObject = getInstrumentNestedGroup()\r\n delete e.Instrument.SecAltIDGrp.NoSecurityAltID[0]['SecurityAltID']\r\n function run () {\r\n toFix(e, er)\r\n }\r\n expect(run).toThrow(/group instance with no delimiter field SecurityAltID/)\r\n})\r\n\r\ntest('encode group not an array of', () => {\r\n expect(er).toBeTruthy()\r\n const e: ILooseObject = {\r\n 'Instrument': {\r\n 'Symbol': 'ac,',\r\n 'SymbolSfx': 'non',\r\n 'SecurityID': 'Pellentesque',\r\n 'SecurityIDSource': 'B',\r\n 'SecAltIDGrp': {\r\n 'NoSecurityAltID': {\r\n elements: []\r\n }\r\n },\r\n 'Product': 2\r\n }\r\n }\r\n function run () {\r\n toFix(e, er)\r\n }\r\n expect(run).toThrow(/expected array instance for group NoSecurityAltID/)\r\n})\r\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const path = require("path");
|
|
13
|
-
const buffer_1 = require("../buffer");
|
|
14
|
-
const transport_1 = require("../transport");
|
|
15
|
-
const util_1 = require("../util");
|
|
16
|
-
const store_1 = require("../store");
|
|
17
|
-
const types_1 = require("../types");
|
|
18
|
-
const config_1 = require("../config");
|
|
19
|
-
const root = path.join(__dirname, '../../data');
|
|
20
|
-
let definitions;
|
|
21
|
-
let views;
|
|
22
|
-
let expected;
|
|
23
|
-
let store;
|
|
24
|
-
let records;
|
|
25
|
-
let recovery;
|
|
26
|
-
beforeAll(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
27
|
-
const sessionDescription = require(path.join(root, 'session/test-initiator.json'));
|
|
28
|
-
const clientFactory = new transport_1.SessionMsgFactory(sessionDescription);
|
|
29
|
-
expected = require(path.join(root, 'examples/FIX.4.4/fix.json'));
|
|
30
|
-
definitions = yield util_1.getDefinitions(sessionDescription.application.dictionary);
|
|
31
|
-
views = yield util_1.replayFixFile(definitions, sessionDescription, path.join(root, 'examples/FIX.4.4/jsfix.test_client.txt'), buffer_1.AsciiChars.Pipe);
|
|
32
|
-
const config = new config_1.JsFixConfig(clientFactory, definitions, sessionDescription, buffer_1.AsciiChars.Pipe);
|
|
33
|
-
store = new store_1.FixMsgMemoryStore('test', config);
|
|
34
|
-
records = views.reduce((agg, v) => {
|
|
35
|
-
if (v.getString(types_1.MsgTag.SenderCompID) === 'accept-tls-comp') {
|
|
36
|
-
agg.push(v.toMsgStoreRecord());
|
|
37
|
-
}
|
|
38
|
-
return agg;
|
|
39
|
-
}, []);
|
|
40
|
-
records.forEach(r => store.put(r));
|
|
41
|
-
recovery = new store_1.FixMsgAsciiStoreReplay(store, config);
|
|
42
|
-
}), 45000);
|
|
43
|
-
test('expect 15 messages in log', () => {
|
|
44
|
-
expect(views.length).toEqual(15);
|
|
45
|
-
});
|
|
46
|
-
test('fetch recovery from seq=1 to seq=10', () => {
|
|
47
|
-
const vec = recovery.getReplayRequest(1, 10);
|
|
48
|
-
let x = 0;
|
|
49
|
-
});
|
|
50
|
-
//# sourceMappingURL=ascii-store-recovery.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ascii-store-recovery.test.js","sourceRoot":"","sources":["../../src/test/ascii-store-recovery.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,6BAA4B;AAE5B,sCAA0D;AAC1D,4CAAqE;AAErE,kCAAuD;AACvD,oCAAqG;AACrG,oCAAiC;AACjC,sCAAuC;AAEvC,MAAM,IAAI,GAAW,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,CAAA;AAEvD,IAAI,WAA2B,CAAA;AAC/B,IAAI,KAAgB,CAAA;AACpB,IAAI,QAAsB,CAAA;AAC1B,IAAI,KAA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,CAAA;AACtD,CAAC,CAAA,EAAE,KAAK,CAAC,CAAA;AAET,IAAI,CAAC,2BAA2B,EAAE,GAAG,EAAE;IACrC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;AAClC,CAAC,CAAC,CAAA;AAcF,IAAI,CAAC,qCAAqC,EAAE,GAAG,EAAE;IAC/C,MAAM,GAAG,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IAC5C,IAAI,CAAC,GAAG,CAAC,CAAA;AACX,CAAC,CAAC,CAAA","sourcesContent":["import * as path from 'path'\r\nimport { FixDefinitions } from '../dictionary'\r\nimport { AsciiChars, AsciiView, MsgView } from '../buffer'\r\nimport { ISessionDescription, SessionMsgFactory } from '../transport'\r\nimport { ILooseObject } from '../collections/collection'\r\nimport { getDefinitions, replayFixFile } from '../util'\r\nimport { FixMsgMemoryStore, FixMsgStoreRecord, IFixMsgStore, FixMsgAsciiStoreReplay } from '../store'\r\nimport { MsgTag } from '../types'\r\nimport { JsFixConfig } from '../config'\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 recovery: FixMsgAsciiStoreReplay\r\n\r\nbeforeAll(async () => {\r\n const sessionDescription: ISessionDescription = require(path.join(root, 'session/test-initiator.json'))\r\n const clientFactory = new SessionMsgFactory(sessionDescription)\r\n expected = require(path.join(root, 'examples/FIX.4.4/fix.json'))\r\n definitions = await getDefinitions(sessionDescription.application.dictionary)\r\n views = await replayFixFile(definitions, sessionDescription, path.join(root, 'examples/FIX.4.4/jsfix.test_client.txt'), AsciiChars.Pipe)\r\n const config = new JsFixConfig(clientFactory, definitions, sessionDescription, AsciiChars.Pipe)\r\n store = new FixMsgMemoryStore('test', config)\r\n records = views.reduce((agg: FixMsgStoreRecord[], v: AsciiView) => {\r\n if (v.getString(MsgTag.SenderCompID) === 'accept-tls-comp') {\r\n agg.push(v.toMsgStoreRecord())\r\n }\r\n return agg\r\n }, [])\r\n records.forEach(r => store.put(r))\r\n recovery = new FixMsgAsciiStoreReplay(store, config)\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('fetch recovery from seq=1 to seq=10', () => {\r\n const vec = recovery.getReplayRequest(1, 10)\r\n let x = 0\r\n})\r\n"]}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ISessionDescription } from './session-description';
|
|
2
|
-
import { ILooseObject } from '../collections/collection';
|
|
3
|
-
import { ASessionMsgFactory, ObjectMutator } from '.';
|
|
4
|
-
import { IStandardHeader } from '../types/FIX4.4/repo';
|
|
5
|
-
export declare class AsciiSessionMsgFactory extends ASessionMsgFactory {
|
|
6
|
-
readonly description: ISessionDescription;
|
|
7
|
-
constructor(description: ISessionDescription, mutator?: ObjectMutator);
|
|
8
|
-
logon(): ILooseObject;
|
|
9
|
-
logout(text: string): ILooseObject;
|
|
10
|
-
header(msgType: string, seqNum: number, time: Date, overrideData?: Partial<IStandardHeader>): ILooseObject;
|
|
11
|
-
}
|
|
12
|
-
export declare class SessionMsgFactory extends AsciiSessionMsgFactory {
|
|
13
|
-
readonly description: ISessionDescription;
|
|
14
|
-
mutator: ObjectMutator;
|
|
15
|
-
constructor(description: ISessionDescription, mutator?: ObjectMutator);
|
|
16
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SessionMsgFactory = exports.AsciiSessionMsgFactory = void 0;
|
|
4
|
-
const types_1 = require("../types");
|
|
5
|
-
const _1 = require(".");
|
|
6
|
-
const repo_1 = require("../types/FIX4.4/repo");
|
|
7
|
-
class AsciiSessionMsgFactory extends _1.ASessionMsgFactory {
|
|
8
|
-
constructor(description, mutator = null) {
|
|
9
|
-
super(description, mutator);
|
|
10
|
-
this.description = description;
|
|
11
|
-
this.isAscii = description.application.protocol === 'ascii';
|
|
12
|
-
}
|
|
13
|
-
logon() {
|
|
14
|
-
const description = this.description;
|
|
15
|
-
const o = {
|
|
16
|
-
Username: description.Username,
|
|
17
|
-
Password: description.Password,
|
|
18
|
-
HeartBtInt: description.HeartBtInt,
|
|
19
|
-
ResetSeqNumFlag: description.ResetSeqNumFlag,
|
|
20
|
-
EncryptMethod: repo_1.EncryptMethod.None
|
|
21
|
-
};
|
|
22
|
-
return this.mutate(o, types_1.MsgType.Logon);
|
|
23
|
-
}
|
|
24
|
-
logout(text) {
|
|
25
|
-
const o = {
|
|
26
|
-
Text: text
|
|
27
|
-
};
|
|
28
|
-
return this.mutate(o, types_1.MsgType.Logout);
|
|
29
|
-
}
|
|
30
|
-
header(msgType, seqNum, time, overrideData) {
|
|
31
|
-
const description = this.description;
|
|
32
|
-
const bodyLength = Math.max(4, description.BodyLengthChars || 7);
|
|
33
|
-
const placeHolder = Math.pow(10, bodyLength - 1) + 1;
|
|
34
|
-
const o = Object.assign({ BeginString: description.BeginString, BodyLength: placeHolder, MsgType: msgType, SenderCompID: description.SenderCompId, MsgSeqNum: seqNum, SendingTime: time, TargetCompID: description.TargetCompID, TargetSubID: description.TargetSubID }, overrideData);
|
|
35
|
-
return this.mutate(o, 'StandardHeader');
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
exports.AsciiSessionMsgFactory = AsciiSessionMsgFactory;
|
|
39
|
-
class SessionMsgFactory extends AsciiSessionMsgFactory {
|
|
40
|
-
constructor(description, mutator = null) {
|
|
41
|
-
super(description, mutator);
|
|
42
|
-
this.description = description;
|
|
43
|
-
this.mutator = mutator;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
exports.SessionMsgFactory = SessionMsgFactory;
|
|
47
|
-
//# sourceMappingURL=ascii-session-msg-factory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ascii-session-msg-factory.js","sourceRoot":"","sources":["../../src/transport/ascii-session-msg-factory.ts"],"names":[],"mappings":";;;AAEA,oCAAkC;AAClC,wBAAqD;AAErD,+CAK6B;AAE7B,MAAa,sBAAuB,SAAQ,qBAAkB;IAE5D,YAAsB,WAAgC,EAAE,UAAyB,IAAI;QACnF,KAAK,CAAC,WAAW,EAAE,OAAO,CAAC,CAAA;QADP,gBAAW,GAAX,WAAW,CAAqB;QAEpD,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC,WAAW,CAAC,QAAQ,KAAK,OAAO,CAAA;IAC7D,CAAC;IAEM,KAAK;QACV,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAA;QACpC,MAAM,CAAC,GAAW;YAChB,QAAQ,EAAE,WAAW,CAAC,QAAQ;YAC9B,QAAQ,EAAE,WAAW,CAAC,QAAQ;YAC9B,UAAU,EAAE,WAAW,CAAC,UAAU;YAClC,eAAe,EAAE,WAAW,CAAC,eAAe;YAC5C,aAAa,EAAE,oBAAa,CAAC,IAAI;SACxB,CAAA;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,eAAO,CAAC,KAAK,CAAC,CAAA;IACtC,CAAC;IAEM,MAAM,CAAE,IAAY;QACzB,MAAM,CAAC,GAAY;YACjB,IAAI,EAAG,IAAI;SACD,CAAA;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,eAAO,CAAC,MAAM,CAAC,CAAA;IACvC,CAAC;IAEM,MAAM,CAAE,OAAe,EAAE,MAAc,EAAE,IAAU,EAAE,YAAuC;QACjG,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAA;QACpC,MAAM,UAAU,GAAW,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,CAAC,eAAe,IAAI,CAAC,CAAC,CAAA;QACxE,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,UAAU,GAAG,CAAC,CAAC,GAAG,CAAC,CAAA;QACpD,MAAM,CAAC,mBACL,WAAW,EAAE,WAAW,CAAC,WAAW,EACpC,UAAU,EAAE,WAAW,EACvB,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,WAAW,CAAC,YAAY,EACtC,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,IAAI,EACjB,YAAY,EAAE,WAAW,CAAC,YAAY,EACtC,WAAW,EAAE,WAAW,CAAC,WAAW,IACjC,YAAY,CAChB,CAAA;QACD,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAA;IACzC,CAAC;CACF;AA3CD,wDA2CC;AAED,MAAa,iBAAkB,SAAQ,sBAAsB;IAC3D,YAA6B,WAAgC,EAAS,UAAyB,IAAI;QACjG,KAAK,CAAC,WAAW,EAAE,OAAO,CAAC,CAAA;QADA,gBAAW,GAAX,WAAW,CAAqB;QAAS,YAAO,GAAP,OAAO,CAAsB;IAEnG,CAAC;CACF;AAJD,8CAIC","sourcesContent":["import { ISessionDescription } from './session-description'\r\nimport { ILooseObject } from '../collections/collection'\r\nimport { MsgType } from '../types'\r\nimport { ASessionMsgFactory, ObjectMutator } from '.'\r\n\r\nimport {\r\n EncryptMethod,\r\n ILogon,\r\n ILogout,\r\n IStandardHeader\r\n} from '../types/FIX4.4/repo'\r\n\r\nexport class AsciiSessionMsgFactory extends ASessionMsgFactory {\r\n\r\n constructor (readonly description: ISessionDescription, mutator: ObjectMutator = null) {\r\n super(description, mutator)\r\n this.isAscii = description.application.protocol === 'ascii'\r\n }\r\n\r\n public logon (): ILooseObject {\r\n const description = this.description\r\n const o: ILogon = {\r\n Username: description.Username,\r\n Password: description.Password,\r\n HeartBtInt: description.HeartBtInt,\r\n ResetSeqNumFlag: description.ResetSeqNumFlag,\r\n EncryptMethod: EncryptMethod.None\r\n } as ILogon\r\n return this.mutate(o, MsgType.Logon)\r\n }\r\n\r\n public logout (text: string): ILooseObject {\r\n const o: ILogout = {\r\n Text: text\r\n } as ILogout\r\n return this.mutate(o, MsgType.Logout)\r\n }\r\n\r\n public header (msgType: string, seqNum: number, time: Date, overrideData?: Partial<IStandardHeader>): ILooseObject {\r\n const description = this.description\r\n const bodyLength: number = Math.max(4, description.BodyLengthChars || 7)\r\n const placeHolder = Math.pow(10, bodyLength - 1) + 1\r\n const o: IStandardHeader = {\r\n BeginString: description.BeginString,\r\n BodyLength: placeHolder,\r\n MsgType: msgType,\r\n SenderCompID: description.SenderCompId,\r\n MsgSeqNum: seqNum,\r\n SendingTime: time,\r\n TargetCompID: description.TargetCompID,\r\n TargetSubID: description.TargetSubID,\r\n ...overrideData\r\n }\r\n return this.mutate(o, 'StandardHeader')\r\n }\r\n}\r\n\r\nexport class SessionMsgFactory extends AsciiSessionMsgFactory {\r\n constructor (public readonly description: ISessionDescription, public mutator: ObjectMutator = null) {\r\n super(description, mutator)\r\n }\r\n}\r\n"]}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.acceptor = void 0;
|
|
13
|
-
const http_1 = require("../http");
|
|
14
|
-
function acceptor(config, sessionFactory) {
|
|
15
|
-
return new Promise((accept, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
16
|
-
const logger = config.logFactory.logger('acceptor');
|
|
17
|
-
logger.info('starting.');
|
|
18
|
-
const acceptor = new http_1.HttpAcceptor(config);
|
|
19
|
-
acceptor.on('transport', (t) => {
|
|
20
|
-
logger.info('creates new transport.');
|
|
21
|
-
const acceptorSession = sessionFactory(config);
|
|
22
|
-
acceptorSession.run(t).then(() => {
|
|
23
|
-
logger.info('ends');
|
|
24
|
-
acceptor.close(() => {
|
|
25
|
-
logger.info('acceptor closed.');
|
|
26
|
-
accept(true);
|
|
27
|
-
});
|
|
28
|
-
}).catch((e) => {
|
|
29
|
-
logger.error(e);
|
|
30
|
-
logger.info(e.stack);
|
|
31
|
-
reject(e);
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
acceptor.listen();
|
|
35
|
-
}));
|
|
36
|
-
}
|
|
37
|
-
exports.acceptor = acceptor;
|
|
38
|
-
//# sourceMappingURL=acceptor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acceptor.js","sourceRoot":"","sources":["../../../src/transport/fixml/acceptor.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,kCAAsC;AAGtC,SAAgB,QAAQ,CAAE,MAAoB,EAAE,cAA8B;IAC5E,OAAO,IAAI,OAAO,CAAM,CAAO,MAAM,EAAE,MAAM,EAAE,EAAE;QAC/C,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,CAAA;QACnD,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QACxB,MAAM,QAAQ,GAAgB,IAAI,mBAAY,CAAC,MAAM,CAAC,CAAA;QACtD,QAAQ,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC,CAAe,EAAE,EAAE;YAC3C,MAAM,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAA;YACrC,MAAM,eAAe,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA;YAC9C,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;gBAC/B,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;gBACnB,QAAQ,CAAC,KAAK,CAAC,GAAG,EAAE;oBAClB,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAA;oBAC/B,MAAM,CAAC,IAAI,CAAC,CAAA;gBACd,CAAC,CAAC,CAAA;YACJ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAQ,EAAE,EAAE;gBACpB,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;gBACf,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;gBACpB,MAAM,CAAC,CAAC,CAAC,CAAA;YACX,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;QACF,QAAQ,CAAC,MAAM,EAAE,CAAA;IACnB,CAAC,CAAA,CAAC,CAAA;AACJ,CAAC;AAtBD,4BAsBC","sourcesContent":["import { IJsFixConfig } from '../../config'\r\nimport { FixAcceptor } from '../fix-acceptor'\r\nimport { MsgTransport } from '../msg-transport'\r\nimport { HttpAcceptor } from '../http'\r\nimport { MakeFixSession } from '../make-fixl-session'\r\n\r\nexport function acceptor (config: IJsFixConfig, sessionFactory: MakeFixSession): Promise<any> {\r\n return new Promise<any>(async (accept, reject) => {\r\n const logger = config.logFactory.logger('acceptor')\r\n logger.info('starting.')\r\n const acceptor: FixAcceptor = new HttpAcceptor(config)\r\n acceptor.on('transport', (t: MsgTransport) => {\r\n logger.info('creates new transport.')\r\n const acceptorSession = sessionFactory(config)\r\n acceptorSession.run(t).then(() => {\r\n logger.info('ends')\r\n acceptor.close(() => {\r\n logger.info('acceptor closed.')\r\n accept(true)\r\n })\r\n }).catch((e: Error) => {\r\n logger.error(e)\r\n logger.info(e.stack)\r\n reject(e)\r\n })\r\n })\r\n acceptor.listen()\r\n })\r\n}\r\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ISessionDescription } from './session-description';
|
|
2
|
-
import { ILooseObject } from '../collections/collection';
|
|
3
|
-
import { ASessionMsgFactory, ObjectMutator } from '.';
|
|
4
|
-
import { IStandardHeader } from '../types/FIXML50SP2';
|
|
5
|
-
export declare class FixmlSessionMsgFactory extends ASessionMsgFactory {
|
|
6
|
-
readonly description: ISessionDescription;
|
|
7
|
-
constructor(description: ISessionDescription, mutator?: ObjectMutator);
|
|
8
|
-
logon(userRequestId?: string, isResponse?: boolean): ILooseObject;
|
|
9
|
-
logout(msgType: string, text: string): ILooseObject;
|
|
10
|
-
header(msgType: string, seqNum?: number, time?: Date, overrideData?: Partial<IStandardHeader>): ILooseObject;
|
|
11
|
-
private fixmlLogon;
|
|
12
|
-
private fixmlLogout;
|
|
13
|
-
}
|