jspurefix 1.4.1 → 2.0.3
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/.eslintrc.js +6 -0
- package/appveyor.yml +4 -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-description.d.ts → segment/segment-description.d.ts} +3 -10
- package/dist/buffer/{segment-description.js → segment/segment-description.js} +5 -13
- package/dist/buffer/segment/segment-description.js.map +1 -0
- package/dist/buffer/{segment-summary.d.ts → segment/segment-summary.d.ts} +0 -0
- package/dist/buffer/{segment-summary.js → segment/segment-summary.js} +0 -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/structure.d.ts +3 -3
- package/dist/buffer/structure.js +1 -1
- package/dist/buffer/structure.js.map +1 -1
- package/dist/buffer/{tag-pos.d.ts → tag/tag-pos.d.ts} +0 -0
- package/dist/buffer/{tag-pos.js → tag/tag-pos.js} +0 -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/{tags.d.ts → tag/tags.d.ts} +3 -14
- package/dist/buffer/{tags.js → tag/tags.js} +24 -37
- package/dist/buffer/tag/tags.js.map +1 -0
- package/dist/config/get-js-fx-logger.d.ts +4 -0
- package/dist/config/get-js-fx-logger.js +3 -0
- 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/{transport/fix-msg-factory.js → dictionary/parser/fix-repository/repository-enum.js} +1 -1
- 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/{transport/make-fixl-session.js → dictionary/parser/fix-repository/repository-message.js} +1 -1
- 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-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/trailer.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/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/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/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 +27 -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/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.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/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/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/test/ascii/ascii-encoder.test.d.ts +1 -0
- package/dist/test/{ascii-encoder.test.js → ascii/ascii-encoder.test.js} +57 -55
- 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-parser.test.js → ascii/ascii-parser.test.js} +33 -52
- 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-segment.test.js → ascii/ascii-segment.test.js} +20 -41
- 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-store-replay.test.js → ascii/ascii-store-replay.test.js} +14 -43
- 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-tag-pos.test.js → ascii/ascii-tag-pos.test.js} +10 -10
- 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/{execution-report.test.js → ascii/execution-report.test.js} +51 -52
- 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/{fix-log-replay.test.js → ascii/fix-log-replay.test.js} +8 -6
- 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/{fix-repo-dict.test.js → ascii/fix-repo-dict.test.js} +8 -7
- 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/{includes.test.js → ascii/includes.test.js} +3 -2
- package/dist/test/ascii/includes.test.js.map +1 -0
- package/dist/test/ascii/logon.test.d.ts +1 -0
- package/dist/test/{logon.test.js → ascii/logon.test.js} +11 -13
- package/dist/test/ascii/logon.test.js.map +1 -0
- package/dist/test/ascii/memory-store.test.d.ts +1 -0
- package/dist/test/{memory-store.test.js → ascii/memory-store.test.js} +12 -12
- 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/{qf-full-msg.test.js → ascii/qf-full-msg.test.js} +21 -17
- 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/{repo-full-ascii-msg.test.js → ascii/repo-full-ascii-msg.test.js} +20 -16
- 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/{session-state.test.js → ascii/session-state.test.js} +2 -1
- package/dist/test/ascii/session-state.test.js.map +1 -0
- package/dist/test/ascii/session.test.d.ts +1 -0
- package/dist/test/{session.test.js → ascii/session.test.js} +14 -145
- package/dist/test/ascii/session.test.js.map +1 -0
- package/dist/test/ascii/time-formatter.test.d.ts +1 -0
- package/dist/test/{time-formatter.test.js → ascii/time-formatter.test.js} +4 -2
- 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/{view-decode.test.js → ascii/view-decode.test.js} +11 -36
- package/dist/test/ascii/view-decode.test.js.map +1 -0
- 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/{to-views.d.ts → env/to-views.d.ts} +2 -2
- package/dist/test/{to-views.js → env/to-views.js} +8 -7
- package/dist/test/env/to-views.js.map +1 -0
- package/dist/test/fixml/fixml-alloc-parse.test.d.ts +1 -0
- package/dist/test/{fixml-alloc-parse.test.js → fixml/fixml-alloc-parse.test.js} +2 -1
- 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-mkt-data-fut-parse.test.js → fixml/fixml-mkt-data-fut-parse.test.js} +2 -1
- 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-mkt-data-settle-parse.test.js → fixml/fixml-mkt-data-settle-parse.test.js} +2 -1
- 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-tc-bi-lateral-parse.test.js → fixml/fixml-tc-bi-lateral-parse.test.js} +2 -1
- 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/{repo-full-fixml-msg.test.js → fixml/repo-full-fixml-msg.test.js} +17 -10
- package/dist/test/fixml/repo-full-fixml-msg.test.js.map +1 -0
- 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/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/header.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/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/{a-session-msg-factory.d.ts → session/a-session-msg-factory.d.ts} +3 -3
- package/dist/transport/{a-session-msg-factory.js → session/a-session-msg-factory.js} +1 -1
- 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/{fix-session-state.js → session/fix-session-state.js} +22 -55
- package/dist/transport/session/fix-session-state.js.map +1 -0
- package/dist/transport/{fix-session.d.ts → session/fix-session.d.ts} +6 -5
- package/dist/transport/{fix-session.js → session/fix-session.js} +45 -43
- package/dist/transport/session/fix-session.js.map +1 -0
- package/dist/transport/{make-fixl-session.d.ts → session/make-fix-session.d.ts} +1 -1
- 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-description.js → session/session-description.js} +0 -0
- package/dist/transport/session/session-description.js.map +1 -0
- package/dist/transport/{fix-msg-factory.d.ts → session/session-msg-factory.d.ts} +2 -2
- 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/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 +18 -13
- 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/buffer/segment-description.js.map +0 -1
- package/dist/buffer/segment-summary.js.map +0 -1
- package/dist/buffer/tag-pos.js.map +0 -1
- package/dist/buffer/tags.js.map +0 -1
- package/dist/dictionary/fields-dispatch.js +0 -40
- package/dist/dictionary/fields-dispatch.js.map +0 -1
- package/dist/sample/launcher.d.ts +0 -12
- package/dist/sample/launcher.js +0 -63
- package/dist/sample/launcher.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 +0 -416
- package/dist/test/ascii-encode.test.js.map +0 -1
- package/dist/test/ascii-encoder.test.d.ts +0 -1
- package/dist/test/ascii-encoder.test.js.map +0 -1
- package/dist/test/ascii-parser.test.d.ts +0 -1
- package/dist/test/ascii-parser.test.js.map +0 -1
- package/dist/test/ascii-segment.test.d.ts +0 -1
- package/dist/test/ascii-segment.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/test/ascii-store-replay.test.d.ts +0 -1
- package/dist/test/ascii-store-replay.test.js.map +0 -1
- package/dist/test/ascii-tag-pos.test.d.ts +0 -1
- package/dist/test/ascii-tag-pos.test.js.map +0 -1
- package/dist/test/execution-report.test.d.ts +0 -1
- package/dist/test/execution-report.test.js.map +0 -1
- package/dist/test/fix-log-replay.test.d.ts +0 -1
- package/dist/test/fix-log-replay.test.js.map +0 -1
- package/dist/test/fix-repo-dict.test.d.ts +0 -1
- package/dist/test/fix-repo-dict.test.js.map +0 -1
- package/dist/test/fixml-alloc-parse.test.d.ts +0 -1
- package/dist/test/fixml-alloc-parse.test.js.map +0 -1
- package/dist/test/fixml-mkt-data-fut-parse.test.d.ts +0 -1
- package/dist/test/fixml-mkt-data-fut-parse.test.js.map +0 -1
- package/dist/test/fixml-mkt-data-settle-parse.test.d.ts +0 -1
- package/dist/test/fixml-mkt-data-settle-parse.test.js.map +0 -1
- package/dist/test/fixml-tc-bi-lateral-parse.test.d.ts +0 -1
- package/dist/test/fixml-tc-bi-lateral-parse.test.js.map +0 -1
- package/dist/test/includes.test.d.ts +0 -1
- package/dist/test/includes.test.js.map +0 -1
- package/dist/test/logon.test.d.ts +0 -1
- package/dist/test/logon.test.js.map +0 -1
- package/dist/test/memory-store.test.d.ts +0 -1
- package/dist/test/memory-store.test.js.map +0 -1
- package/dist/test/qf-full-msg.test.d.ts +0 -1
- package/dist/test/qf-full-msg.test.js.map +0 -1
- package/dist/test/repo-full-ascii-msg.test.d.ts +0 -1
- package/dist/test/repo-full-ascii-msg.test.js.map +0 -1
- package/dist/test/repo-full-fixml-msg.test.d.ts +0 -1
- package/dist/test/repo-full-fixml-msg.test.js.map +0 -1
- package/dist/test/session-state.test.d.ts +0 -1
- package/dist/test/session-state.test.js.map +0 -1
- package/dist/test/session.test.d.ts +0 -1
- package/dist/test/session.test.js.map +0 -1
- package/dist/test/time-formatter.test.d.ts +0 -1
- package/dist/test/time-formatter.test.js.map +0 -1
- package/dist/test/to-views.js.map +0 -1
- package/dist/test/view-decode.test.d.ts +0 -1
- package/dist/test/view-decode.test.js.map +0 -1
- package/dist/transport/a-session-msg-factory.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/fix-msg-factory.js.map +0 -1
- package/dist/transport/fix-session-state.d.ts +0 -70
- package/dist/transport/fix-session-state.js.map +0 -1
- package/dist/transport/fix-session.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/session-description.d.ts +0 -64
- package/dist/transport/session-description.js.map +0 -1
- package/dist/transport/session-msg-factory.d.ts +0 -28
- package/dist/transport/session-msg-factory.js +0 -153
- package/dist/transport/session-msg-factory.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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"respawn-2.js","sourceRoot":"","sources":["../../../../src/sample/tcp/recovering-skeleton/respawn-2.ts"],"names":[],"mappings":"AAAA,MAAO,KAAK;CAEX","sourcesContent":["class fffff {\r\n\r\n}"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { IFixMsgStore } from './fix-msg-store';
|
|
2
|
-
import { ILooseObject } from '../collections/collection';
|
|
3
|
-
import { IFixMsgStoreRecord } from './fix-msg-store-record';
|
|
4
|
-
import { IJsFixConfig } from '../config';
|
|
5
|
-
export declare class FixMsgAsciiStoreRecovery {
|
|
6
|
-
readonly store: IFixMsgStore;
|
|
7
|
-
readonly config: IJsFixConfig;
|
|
8
|
-
constructor(store: IFixMsgStore, config: IJsFixConfig);
|
|
9
|
-
getReplayRequest(startSeq: number, endSeq: number): ILooseObject[];
|
|
10
|
-
createMsg(record: IFixMsgStoreRecord): ILooseObject;
|
|
11
|
-
gap(newSeq: number): ILooseObject;
|
|
12
|
-
}
|
|
@@ -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,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,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,CAAC,CAAA;gBAE/B,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,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,CAAC,CAAA;QAC/B,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,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 {};
|