jspurefix 2.2.1 → 3.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/.eslintrc +30 -0
- package/README.md +297 -249
- package/data/session/test-http-initiator.json +2 -2
- package/dist/buffer/ascii/ascii-chars.js.map +1 -1
- package/dist/buffer/ascii/ascii-encoder.js +9 -5
- package/dist/buffer/ascii/ascii-encoder.js.map +1 -1
- package/dist/buffer/ascii/ascii-parser-state.d.ts +2 -2
- package/dist/buffer/ascii/ascii-parser-state.js +1 -1
- package/dist/buffer/ascii/ascii-parser-state.js.map +1 -1
- package/dist/buffer/ascii/ascii-parser.d.ts +2 -2
- package/dist/buffer/ascii/ascii-parser.js +17 -11
- package/dist/buffer/ascii/ascii-parser.js.map +1 -1
- package/dist/buffer/ascii/ascii-segment-parser.d.ts +1 -1
- package/dist/buffer/ascii/ascii-segment-parser.js +11 -3
- package/dist/buffer/ascii/ascii-segment-parser.js.map +1 -1
- package/dist/buffer/ascii/ascii-view.d.ts +3 -3
- package/dist/buffer/ascii/ascii-view.js +18 -0
- package/dist/buffer/ascii/ascii-view.js.map +1 -1
- package/dist/buffer/ascii/itime-formatter.d.ts +12 -12
- package/dist/buffer/ascii/itime-formatter.js.map +1 -1
- package/dist/buffer/ascii/time-formatter.d.ts +6 -6
- package/dist/buffer/ascii/time-formatter.js.map +1 -1
- package/dist/buffer/elastic-buffer.d.ts +1 -1
- package/dist/buffer/elastic-buffer.js +2 -2
- package/dist/buffer/elastic-buffer.js.map +1 -1
- package/dist/buffer/encode-proxy.js +1 -1
- package/dist/buffer/encode-proxy.js.map +1 -1
- package/dist/buffer/encoder-state.d.ts +2 -2
- package/dist/buffer/encoder-state.js +4 -1
- package/dist/buffer/encoder-state.js.map +1 -1
- package/dist/buffer/fixml/fixml-encoder.js +4 -2
- package/dist/buffer/fixml/fixml-encoder.js.map +1 -1
- package/dist/buffer/fixml/fixml-parser.js +61 -39
- package/dist/buffer/fixml/fixml-parser.js.map +1 -1
- package/dist/buffer/fixml/fixml-view.js +3 -3
- package/dist/buffer/fixml/fixml-view.js.map +1 -1
- package/dist/buffer/fixml/populated-attributes.js.map +1 -1
- package/dist/buffer/msg-encoder.js +2 -1
- package/dist/buffer/msg-encoder.js.map +1 -1
- package/dist/buffer/msg-view.d.ts +9 -9
- package/dist/buffer/msg-view.js +58 -25
- package/dist/buffer/msg-view.js.map +1 -1
- package/dist/buffer/segment/segment-description.d.ts +4 -4
- package/dist/buffer/segment/segment-description.js +7 -5
- package/dist/buffer/segment/segment-description.js.map +1 -1
- package/dist/buffer/segment/segment-summary.js +2 -1
- package/dist/buffer/segment/segment-summary.js.map +1 -1
- package/dist/buffer/structure.d.ts +1 -1
- package/dist/buffer/structure.js +1 -2
- package/dist/buffer/structure.js.map +1 -1
- package/dist/buffer/time-format-template.js.map +1 -1
- package/dist/collections/collection.d.ts +3 -7
- package/dist/collections/collection.js.map +1 -1
- package/dist/collections/dictionary.d.ts +1 -1
- package/dist/collections/dictionary.js +2 -1
- package/dist/collections/dictionary.js.map +1 -1
- package/dist/config/empty-log-factory.js.map +1 -1
- package/dist/config/get-js-fx-logger.d.ts +1 -3
- package/dist/config/get-js-fx-logger.js.map +1 -1
- package/dist/config/js-fix-config.d.ts +3 -3
- package/dist/config/js-fix-config.js.map +1 -1
- package/dist/config/js-fix-logger.d.ts +5 -5
- package/dist/config/js-fix-logger.js.map +1 -1
- package/dist/config/js-fix-winston-log-factory.d.ts +1 -1
- package/dist/config/js-fix-winston-log-factory.js.map +1 -1
- package/dist/config/winston-logger.js +7 -7
- package/dist/config/winston-logger.js.map +1 -1
- package/dist/dict-parser.js +27 -21
- package/dist/dict-parser.js.map +1 -1
- package/dist/dictionary/compiler/compiler-settings.js.map +1 -1
- package/dist/dictionary/compiler/compiler-type.js.map +1 -1
- package/dist/dictionary/compiler/enum-compiler.d.ts +2 -2
- package/dist/dictionary/compiler/enum-compiler.js +7 -10
- package/dist/dictionary/compiler/enum-compiler.js.map +1 -1
- package/dist/dictionary/compiler/msg-compiler.js +9 -10
- package/dist/dictionary/compiler/msg-compiler.js.map +1 -1
- package/dist/dictionary/compiler/standard-snippet.d.ts +1 -1
- package/dist/dictionary/compiler/standard-snippet.js +11 -10
- package/dist/dictionary/compiler/standard-snippet.js.map +1 -1
- package/dist/dictionary/contained/contained-component-field.d.ts +2 -2
- package/dist/dictionary/contained/contained-component-field.js +1 -1
- package/dist/dictionary/contained/contained-component-field.js.map +1 -1
- package/dist/dictionary/contained/contained-field-dispatcher.d.ts +3 -9
- package/dist/dictionary/contained/contained-field-dispatcher.js.map +1 -1
- package/dist/dictionary/contained/contained-field-set.d.ts +4 -4
- package/dist/dictionary/contained/contained-field-set.js +1 -1
- package/dist/dictionary/contained/contained-field-set.js.map +1 -1
- package/dist/dictionary/contained/contained-field.d.ts +1 -0
- package/dist/dictionary/contained/contained-field.js +3 -0
- package/dist/dictionary/contained/contained-field.js.map +1 -1
- package/dist/dictionary/contained/contained-group-field.d.ts +2 -2
- package/dist/dictionary/contained/contained-group-field.js +1 -1
- package/dist/dictionary/contained/contained-group-field.js.map +1 -1
- package/dist/dictionary/contained/contained-simple-field.d.ts +2 -2
- package/dist/dictionary/contained/contained-simple-field.js +1 -1
- package/dist/dictionary/contained/contained-simple-field.js.map +1 -1
- package/dist/dictionary/contained/field-dispatcher.d.ts +3 -9
- package/dist/dictionary/contained/field-dispatcher.js.map +1 -1
- package/dist/dictionary/contained/fields-dispatch.js +0 -1
- package/dist/dictionary/contained/fields-dispatch.js.map +1 -1
- package/dist/dictionary/definition/component-field-definition.d.ts +3 -3
- package/dist/dictionary/definition/component-field-definition.js +1 -1
- package/dist/dictionary/definition/component-field-definition.js.map +1 -1
- package/dist/dictionary/definition/fix-definitions.d.ts +3 -3
- package/dist/dictionary/definition/fix-definitions.js +3 -2
- package/dist/dictionary/definition/fix-definitions.js.map +1 -1
- package/dist/dictionary/definition/group-field-definition.d.ts +4 -4
- package/dist/dictionary/definition/group-field-definition.js +1 -1
- package/dist/dictionary/definition/group-field-definition.js.map +1 -1
- package/dist/dictionary/definition/message-definition.d.ts +2 -2
- package/dist/dictionary/definition/message-definition.js.map +1 -1
- package/dist/dictionary/definition/simple-field-definition.d.ts +4 -4
- package/dist/dictionary/definition/simple-field-definition.js +3 -2
- package/dist/dictionary/definition/simple-field-definition.js.map +1 -1
- package/dist/dictionary/dict-primitive.d.ts +1 -1
- package/dist/dictionary/dict-primitive.js.map +1 -1
- package/dist/dictionary/field-enum.js.map +1 -1
- package/dist/dictionary/fix-versions.js.map +1 -1
- package/dist/dictionary/parser/fix-repository/repository-xml-parser.js +20 -18
- package/dist/dictionary/parser/fix-repository/repository-xml-parser.js.map +1 -1
- package/dist/dictionary/parser/fix-repository/repository.js +24 -16
- 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 +24 -15
- 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 +5 -5
- 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.d.ts +1 -1
- package/dist/dictionary/parser/fixml/include-graph.js +58 -48
- 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 +34 -23
- package/dist/dictionary/parser/fixml/xsd-parser.js.map +1 -1
- package/dist/dictionary/parser/quickfix/field-definition-parser.js +0 -2
- package/dist/dictionary/parser/quickfix/field-definition-parser.js.map +1 -1
- package/dist/dictionary/parser/quickfix/field-set-parser.js +3 -2
- package/dist/dictionary/parser/quickfix/field-set-parser.js.map +1 -1
- package/dist/dictionary/parser/quickfix/message-parser.js +10 -5
- package/dist/dictionary/parser/quickfix/message-parser.js.map +1 -1
- package/dist/dictionary/parser/quickfix/node-parser.js +14 -8
- package/dist/dictionary/parser/quickfix/node-parser.js.map +1 -1
- package/dist/dictionary/parser/quickfix/parse-context.d.ts +5 -5
- package/dist/dictionary/parser/quickfix/parse-context.js.map +1 -1
- package/dist/dictionary/parser/quickfix/quick-fix-xml-file-parser.js +22 -19
- package/dist/dictionary/parser/quickfix/quick-fix-xml-file-parser.js.map +1 -1
- package/dist/dictionary/set-reduce.js.map +1 -1
- package/dist/dictionary/type-dispatcher.d.ts +3 -9
- package/dist/dictionary/type-dispatcher.js.map +1 -1
- package/dist/dictionary/version-util.js +8 -8
- package/dist/dictionary/version-util.js.map +1 -1
- package/dist/jsfix-cmd.d.ts +3 -1
- package/dist/jsfix-cmd.js +134 -99
- package/dist/jsfix-cmd.js.map +1 -1
- package/dist/runtime/make-config.js +34 -14
- package/dist/runtime/make-config.js.map +1 -1
- package/dist/runtime/session-container.d.ts +3 -2
- package/dist/runtime/session-container.js +36 -16
- package/dist/runtime/session-container.js.map +1 -1
- package/dist/runtime/session-launcher.d.ts +10 -6
- package/dist/runtime/session-launcher.js +80 -43
- package/dist/runtime/session-launcher.js.map +1 -1
- package/dist/sample/http/oms/app.js +37 -7
- package/dist/sample/http/oms/app.js.map +1 -1
- package/dist/sample/http/oms/http-client.js +4 -2
- package/dist/sample/http/oms/http-client.js.map +1 -1
- package/dist/sample/http/oms/http-server.js +7 -1
- package/dist/sample/http/oms/http-server.js.map +1 -1
- package/dist/sample/http/oms/oms-factory.js +4 -3
- package/dist/sample/http/oms/oms-factory.js.map +1 -1
- package/dist/sample/tcp/qf-md/app.js +3 -3
- package/dist/sample/tcp/qf-md/app.js.map +1 -1
- package/dist/sample/tcp/qf-md/md-client.js +2 -1
- package/dist/sample/tcp/qf-md/md-client.js.map +1 -1
- package/dist/sample/tcp/qf-md/md-factory.js.map +1 -1
- package/dist/sample/tcp/qf-md/md-server.d.ts +1 -1
- package/dist/sample/tcp/qf-md/md-server.js +2 -1
- package/dist/sample/tcp/qf-md/md-server.js.map +1 -1
- package/dist/sample/tcp/recovering-skeleton/app.js +29 -16
- package/dist/sample/tcp/recovering-skeleton/app.js.map +1 -1
- package/dist/sample/tcp/recovering-skeleton/respawn-acceptor.d.ts +9 -1
- package/dist/sample/tcp/recovering-skeleton/respawn-acceptor.js +51 -2
- package/dist/sample/tcp/recovering-skeleton/respawn-acceptor.js.map +1 -1
- package/dist/sample/tcp/recovering-skeleton/skeleton-client.js +2 -1
- package/dist/sample/tcp/recovering-skeleton/skeleton-client.js.map +1 -1
- package/dist/sample/tcp/recovering-skeleton/skeleton-server.js +4 -3
- package/dist/sample/tcp/recovering-skeleton/skeleton-server.js.map +1 -1
- package/dist/sample/tcp/skeleton/app.js.map +1 -1
- package/dist/sample/tcp/skeleton/skeleton-session.js +7 -4
- package/dist/sample/tcp/skeleton/skeleton-session.js.map +1 -1
- package/dist/sample/tcp/tls-trade-capture/app.js.map +1 -1
- package/dist/sample/tcp/trade-capture/app-launcher.js +3 -3
- package/dist/sample/tcp/trade-capture/app-launcher.js.map +1 -1
- package/dist/sample/tcp/trade-capture/trade-capture-client.d.ts +1 -1
- package/dist/sample/tcp/trade-capture/trade-capture-client.js +2 -1
- package/dist/sample/tcp/trade-capture/trade-capture-client.js.map +1 -1
- package/dist/sample/tcp/trade-capture/trade-capture-server.js +7 -2
- package/dist/sample/tcp/trade-capture/trade-capture-server.js.map +1 -1
- package/dist/sample/tcp/trade-capture/trade-factory.js.map +1 -1
- package/dist/store/fix-msg-ascii-store-resend.js +18 -7
- package/dist/store/fix-msg-ascii-store-resend.js.map +1 -1
- package/dist/store/fix-msg-memory-store.d.ts +3 -3
- package/dist/store/fix-msg-memory-store.js +93 -69
- package/dist/store/fix-msg-memory-store.js.map +1 -1
- package/dist/store/fix-msg-store-record.d.ts +6 -6
- package/dist/store/fix-msg-store-record.js +2 -1
- package/dist/store/fix-msg-store-record.js.map +1 -1
- package/dist/store/fix-msg-store-state.js.map +1 -1
- package/dist/store/fix-msg-store.d.ts +7 -7
- package/dist/store/fix-msg-store.js.map +1 -1
- package/dist/test/ascii/ascii-encoder.test.js +93 -63
- package/dist/test/ascii/ascii-encoder.test.js.map +1 -1
- package/dist/test/ascii/ascii-parser.test.js +28 -24
- package/dist/test/ascii/ascii-parser.test.js.map +1 -1
- package/dist/test/ascii/ascii-segment.test.js +16 -11
- package/dist/test/ascii/ascii-segment.test.js.map +1 -1
- package/dist/test/ascii/ascii-store-replay.test.js +1 -1
- package/dist/test/ascii/ascii-store-replay.test.js.map +1 -1
- package/dist/test/ascii/ascii-tag-pos.test.js +7 -3
- package/dist/test/ascii/ascii-tag-pos.test.js.map +1 -1
- package/dist/test/ascii/execution-report.test.js +80 -72
- package/dist/test/ascii/execution-report.test.js.map +1 -1
- package/dist/test/ascii/fix-log-replay.test.js +1 -1
- package/dist/test/ascii/fix-log-replay.test.js.map +1 -1
- package/dist/test/ascii/fix-repo-dict.test.js +58 -55
- package/dist/test/ascii/fix-repo-dict.test.js.map +1 -1
- package/dist/test/ascii/includes.test.js +1 -1
- package/dist/test/ascii/includes.test.js.map +1 -1
- package/dist/test/ascii/logon.test.js +3 -3
- package/dist/test/ascii/logon.test.js.map +1 -1
- package/dist/test/ascii/memory-store.test.js +3 -3
- package/dist/test/ascii/memory-store.test.js.map +1 -1
- package/dist/test/ascii/qf-full-msg.test.js +19 -16
- package/dist/test/ascii/qf-full-msg.test.js.map +1 -1
- package/dist/test/ascii/repo-full-ascii-msg.test.js +11 -11
- package/dist/test/ascii/repo-full-ascii-msg.test.js.map +1 -1
- package/dist/test/ascii/session-state.test.js.map +1 -1
- package/dist/test/ascii/session.test.js +59 -42
- package/dist/test/ascii/session.test.js.map +1 -1
- package/dist/test/ascii/view-decode.test.js +30 -22
- package/dist/test/ascii/view-decode.test.js.map +1 -1
- package/dist/test/encode-proxy.test.js +29 -29
- package/dist/test/encode-proxy.test.js.map +1 -1
- package/dist/test/env/experiment.js +5 -5
- package/dist/test/env/experiment.js.map +1 -1
- package/dist/test/env/parsing-result.d.ts +3 -3
- package/dist/test/env/parsing-result.js.map +1 -1
- package/dist/test/env/setup.d.ts +2 -2
- package/dist/test/env/setup.js +13 -11
- package/dist/test/env/setup.js.map +1 -1
- package/dist/test/env/skeleton-runner.d.ts +1 -1
- package/dist/test/env/skeleton-runner.js +16 -16
- package/dist/test/env/skeleton-runner.js.map +1 -1
- package/dist/test/env/test-recovery.d.ts +3 -3
- package/dist/test/env/test-recovery.js +1 -1
- package/dist/test/env/test-recovery.js.map +1 -1
- package/dist/test/env/to-views.d.ts +1 -1
- package/dist/test/env/to-views.js +2 -2
- package/dist/test/env/to-views.js.map +1 -1
- package/dist/test/fixml/fixml-alloc-parse.test.js +32 -15
- package/dist/test/fixml/fixml-alloc-parse.test.js.map +1 -1
- package/dist/test/fixml/fixml-mkt-data-fut-parse.test.js +2 -2
- package/dist/test/fixml/fixml-mkt-data-fut-parse.test.js.map +1 -1
- package/dist/test/fixml/fixml-mkt-data-settle-parse.test.js +2 -1
- package/dist/test/fixml/fixml-mkt-data-settle-parse.test.js.map +1 -1
- package/dist/test/fixml/fixml-tc-bi-lateral-parse.test.js +19 -12
- package/dist/test/fixml/fixml-tc-bi-lateral-parse.test.js.map +1 -1
- package/dist/test/fixml/repo-full-fixml-msg.test.js +2 -2
- package/dist/test/fixml/repo-full-fixml-msg.test.js.map +1 -1
- package/dist/transport/ascii/ascii-msg-transmitter.d.ts +1 -1
- package/dist/transport/ascii/ascii-msg-transmitter.js +18 -8
- package/dist/transport/ascii/ascii-msg-transmitter.js.map +1 -1
- package/dist/transport/ascii/ascii-session-msg-factory.d.ts +3 -3
- package/dist/transport/ascii/ascii-session-msg-factory.js +4 -2
- 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 +34 -16
- package/dist/transport/ascii/ascii-session.js.map +1 -1
- package/dist/transport/duplex/http-duplex.js +10 -8
- package/dist/transport/duplex/http-duplex.js.map +1 -1
- package/dist/transport/duplex/string-duplex.js +2 -2
- package/dist/transport/duplex/string-duplex.js.map +1 -1
- package/dist/transport/factory/msg-transport.js +21 -10
- package/dist/transport/factory/msg-transport.js.map +1 -1
- package/dist/transport/fix-acceptor.d.ts +3 -3
- package/dist/transport/fix-acceptor.js.map +1 -1
- package/dist/transport/fix-entity.d.ts +1 -1
- package/dist/transport/fix-entity.js.map +1 -1
- 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.d.ts +1 -1
- package/dist/transport/fixml/fixml-msg-transmitter.js +4 -2
- package/dist/transport/fixml/fixml-msg-transmitter.js.map +1 -1
- package/dist/transport/fixml/fixml-session-msg-factory.d.ts +1 -1
- package/dist/transport/fixml/fixml-session-msg-factory.js.map +1 -1
- package/dist/transport/fixml/fixml-session.js +7 -3
- package/dist/transport/fixml/fixml-session.js.map +1 -1
- package/dist/transport/http/html-options.d.ts +2 -2
- package/dist/transport/http/html-options.js.map +1 -1
- package/dist/transport/http/html-route.js.map +1 -1
- package/dist/transport/http/http-acceptor-listener.js +27 -23
- package/dist/transport/http/http-acceptor-listener.js.map +1 -1
- package/dist/transport/http/http-acceptor.d.ts +2 -2
- package/dist/transport/http/http-acceptor.js +52 -41
- package/dist/transport/http/http-acceptor.js.map +1 -1
- package/dist/transport/http/http-adapter.d.ts +3 -3
- package/dist/transport/http/http-adapter.js.map +1 -1
- package/dist/transport/http/http-initiator.js +35 -23
- package/dist/transport/http/http-initiator.js.map +1 -1
- package/dist/transport/http/http-json-sample-adapter.d.ts +4 -4
- package/dist/transport/http/http-json-sample-adapter.js +16 -11
- package/dist/transport/http/http-json-sample-adapter.js.map +1 -1
- package/dist/transport/http/http-transaction.js.map +1 -1
- package/dist/transport/http/http-transport-description.js.map +1 -1
- package/dist/transport/msg-application.js.map +1 -1
- package/dist/transport/msg-transmitter.d.ts +1 -1
- package/dist/transport/msg-transmitter.js +2 -2
- package/dist/transport/msg-transmitter.js.map +1 -1
- package/dist/transport/session/a-session-msg-factory.d.ts +3 -5
- package/dist/transport/session/a-session-msg-factory.js.map +1 -1
- package/dist/transport/session/fix-session-state.d.ts +8 -5
- package/dist/transport/session/fix-session-state.js +21 -16
- package/dist/transport/session/fix-session-state.js.map +1 -1
- package/dist/transport/session/fix-session.d.ts +19 -6
- package/dist/transport/session/fix-session.js +197 -110
- package/dist/transport/session/fix-session.js.map +1 -1
- package/dist/transport/session/make-fix-session.d.ts +1 -3
- package/dist/transport/session/make-fix-session.js.map +1 -1
- package/dist/transport/session/session-description.d.ts +1 -1
- package/dist/transport/session/session-description.js.map +1 -1
- package/dist/transport/session/session-msg-factory.d.ts +9 -9
- package/dist/transport/session/session-msg-factory.js.map +1 -1
- package/dist/transport/tcp/recovering-tcp-initiator.d.ts +4 -2
- package/dist/transport/tcp/recovering-tcp-initiator.js +62 -30
- package/dist/transport/tcp/recovering-tcp-initiator.js.map +1 -1
- package/dist/transport/tcp/tcp-acceptor-listener.js +28 -25
- package/dist/transport/tcp/tcp-acceptor-listener.js.map +1 -1
- package/dist/transport/tcp/tcp-acceptor.d.ts +2 -2
- package/dist/transport/tcp/tcp-acceptor.js +23 -15
- package/dist/transport/tcp/tcp-acceptor.js.map +1 -1
- package/dist/transport/tcp/tcp-initiator-connector.js +39 -30
- package/dist/transport/tcp/tcp-initiator-connector.js.map +1 -1
- package/dist/transport/tcp/tcp-initiator.d.ts +1 -1
- package/dist/transport/tcp/tcp-initiator.js +130 -104
- package/dist/transport/tcp/tcp-initiator.js.map +1 -1
- package/dist/transport/tcp/tcp-transport-description.js.map +1 -1
- package/dist/transport/tcp/tls-options-factory.d.ts +3 -3
- package/dist/transport/tcp/tls-options-factory.js +10 -3
- package/dist/transport/tcp/tls-options-factory.js.map +1 -1
- package/dist/transport/tcp/tls-options.d.ts +6 -2
- package/dist/transport/tcp/tls-options.js.map +1 -1
- package/dist/util/json-helper.js +2 -1
- package/dist/util/json-helper.js.map +1 -1
- package/dist/util/message-generator.d.ts +1 -1
- package/dist/util/message-generator.js +1 -1
- package/dist/util/message-generator.js.map +1 -1
- package/package.json +53 -48
- package/src/buffer/ascii/ascii-chars.ts +0 -1
- package/src/buffer/ascii/ascii-encoder.ts +18 -16
- package/src/buffer/ascii/ascii-parser-state.ts +4 -4
- package/src/buffer/ascii/ascii-parser.ts +16 -13
- package/src/buffer/ascii/ascii-segment-parser.ts +16 -15
- package/src/buffer/ascii/ascii-view.ts +22 -14
- package/src/buffer/ascii/itime-formatter.ts +12 -12
- package/src/buffer/ascii/time-formatter.ts +11 -12
- package/src/buffer/elastic-buffer.ts +5 -6
- package/src/buffer/encode-proxy.ts +6 -5
- package/src/buffer/encoder-state.ts +7 -3
- package/src/buffer/fixml/fixml-encoder.ts +10 -10
- package/src/buffer/fixml/fixml-parser.ts +80 -60
- package/src/buffer/fixml/fixml-view.ts +6 -7
- package/src/buffer/fixml/populated-attributes.ts +1 -1
- package/src/buffer/msg-encoder.ts +2 -1
- package/src/buffer/msg-view.ts +73 -53
- package/src/buffer/segment/segment-description.ts +13 -13
- package/src/buffer/segment/segment-summary.ts +3 -2
- package/src/buffer/structure.ts +6 -6
- package/src/buffer/time-format-template.ts +1 -1
- package/src/collections/collection.ts +2 -6
- package/src/collections/dictionary.ts +4 -5
- package/src/config/empty-log-factory.ts +1 -0
- package/src/config/get-js-fx-logger.ts +1 -2
- package/src/config/js-fix-config.ts +6 -6
- package/src/config/js-fix-logger.ts +14 -9
- package/src/config/js-fix-winston-log-factory.ts +2 -1
- package/src/config/winston-logger.ts +9 -7
- package/src/dictionary/compiler/compiler-settings.ts +5 -5
- package/src/dictionary/compiler/compiler-type.ts +1 -1
- package/src/dictionary/compiler/enum-compiler.ts +14 -16
- package/src/dictionary/compiler/msg-compiler.ts +15 -17
- package/src/dictionary/compiler/standard-snippet.ts +28 -27
- package/src/dictionary/contained/contained-component-field.ts +5 -4
- package/src/dictionary/contained/contained-field-dispatcher.ts +3 -3
- package/src/dictionary/contained/contained-field-set.ts +21 -21
- package/src/dictionary/contained/contained-field.ts +4 -1
- package/src/dictionary/contained/contained-group-field.ts +4 -4
- package/src/dictionary/contained/contained-simple-field.ts +5 -5
- package/src/dictionary/contained/field-dispatcher.ts +3 -3
- package/src/dictionary/contained/fields-dispatch.ts +0 -1
- package/src/dictionary/definition/component-field-definition.ts +4 -4
- package/src/dictionary/definition/fix-definitions.ts +8 -8
- package/src/dictionary/definition/group-field-definition.ts +5 -5
- package/src/dictionary/definition/message-definition.ts +4 -4
- package/src/dictionary/definition/simple-field-definition.ts +9 -9
- package/src/dictionary/dict-primitive.ts +2 -2
- package/src/dictionary/field-enum.ts +3 -2
- package/src/dictionary/fix-versions.ts +10 -10
- package/src/dictionary/parser/fix-repository/repository-xml-parser.ts +7 -8
- package/src/dictionary/parser/fix-repository/repository.ts +38 -30
- package/src/dictionary/parser/fixml/components-parser.ts +57 -51
- package/src/dictionary/parser/fixml/fields-parser.ts +9 -10
- package/src/dictionary/parser/fixml/fix-xsd-parser.ts +2 -3
- package/src/dictionary/parser/fixml/include-graph.ts +26 -21
- package/src/dictionary/parser/fixml/xsd-parser.ts +5 -5
- package/src/dictionary/parser/quickfix/field-definition-parser.ts +3 -5
- package/src/dictionary/parser/quickfix/field-set-parser.ts +2 -2
- package/src/dictionary/parser/quickfix/message-parser.ts +9 -6
- package/src/dictionary/parser/quickfix/node-parser.ts +20 -18
- package/src/dictionary/parser/quickfix/parse-context.ts +4 -4
- package/src/dictionary/parser/quickfix/quick-fix-xml-file-parser.ts +13 -15
- package/src/dictionary/set-reduce.ts +4 -3
- package/src/dictionary/type-dispatcher.ts +3 -3
- package/src/dictionary/version-util.ts +8 -8
- package/src/jsfix-cmd.ts +82 -58
- package/src/runtime/make-config.ts +15 -10
- package/src/runtime/session-container.ts +26 -18
- package/src/runtime/session-launcher.ts +58 -30
- package/src/sample/http/oms/app.ts +24 -7
- package/src/sample/http/oms/http-client.ts +3 -3
- package/src/sample/http/oms/http-server.ts +7 -1
- package/src/sample/http/oms/oms-factory.ts +3 -3
- package/src/sample/tcp/qf-md/app.ts +3 -3
- package/src/sample/tcp/qf-md/md-client.ts +1 -1
- package/src/sample/tcp/qf-md/md-factory.ts +3 -2
- package/src/sample/tcp/qf-md/md-server.ts +2 -2
- package/src/sample/tcp/recovering-skeleton/app.ts +37 -20
- package/src/sample/tcp/recovering-skeleton/respawn-acceptor.ts +66 -4
- package/src/sample/tcp/recovering-skeleton/skeleton-client.ts +2 -2
- package/src/sample/tcp/recovering-skeleton/skeleton-server.ts +4 -4
- package/src/sample/tcp/skeleton/app.ts +1 -1
- package/src/sample/tcp/skeleton/skeleton-session.ts +7 -7
- package/src/sample/tcp/tls-trade-capture/app.ts +1 -1
- package/src/sample/tcp/trade-capture/app-launcher.ts +4 -4
- package/src/sample/tcp/trade-capture/trade-capture-client.ts +7 -5
- package/src/sample/tcp/trade-capture/trade-capture-server.ts +10 -5
- package/src/sample/tcp/trade-capture/trade-factory.ts +1 -1
- package/src/store/fix-msg-ascii-store-resend.ts +5 -6
- package/src/store/fix-msg-memory-store.ts +22 -21
- package/src/store/fix-msg-store-record.ts +8 -8
- package/src/store/fix-msg-store-state.ts +2 -2
- package/src/store/fix-msg-store.ts +7 -7
- package/src/transport/ascii/ascii-msg-transmitter.ts +20 -14
- package/src/transport/ascii/ascii-session-msg-factory.ts +5 -6
- package/src/transport/ascii/ascii-session.ts +40 -29
- package/src/transport/duplex/http-duplex.ts +11 -9
- package/src/transport/duplex/string-duplex.ts +4 -5
- package/src/transport/factory/msg-transport.ts +5 -6
- package/src/transport/fix-acceptor.ts +2 -2
- package/src/transport/fix-entity.ts +1 -1
- package/src/transport/fix-initiator.ts +1 -1
- package/src/transport/fixml/fixml-msg-transmitter.ts +4 -3
- package/src/transport/fixml/fixml-session-msg-factory.ts +1 -2
- package/src/transport/fixml/fixml-session.ts +7 -6
- package/src/transport/http/html-options.ts +5 -5
- package/src/transport/http/html-route.ts +1 -1
- package/src/transport/http/http-acceptor-listener.ts +6 -4
- package/src/transport/http/http-acceptor.ts +36 -34
- package/src/transport/http/http-adapter.ts +3 -3
- package/src/transport/http/http-initiator.ts +22 -16
- package/src/transport/http/http-json-sample-adapter.ts +17 -16
- package/src/transport/http/http-transaction.ts +1 -1
- package/src/transport/http/http-transport-description.ts +1 -1
- package/src/transport/msg-application.ts +4 -4
- package/src/transport/msg-transmitter.ts +5 -5
- package/src/transport/session/a-session-msg-factory.ts +2 -3
- package/src/transport/session/fix-session-state.ts +24 -18
- package/src/transport/session/fix-session.ts +169 -96
- package/src/transport/session/make-fix-session.ts +1 -2
- package/src/transport/session/session-description.ts +2 -2
- package/src/transport/session/session-msg-factory.ts +9 -9
- package/src/transport/tcp/recovering-tcp-initiator.ts +39 -21
- package/src/transport/tcp/tcp-acceptor-listener.ts +4 -3
- package/src/transport/tcp/tcp-acceptor.ts +23 -22
- package/src/transport/tcp/tcp-initiator-connector.ts +16 -10
- package/src/transport/tcp/tcp-initiator.ts +57 -46
- package/src/transport/tcp/tcp-transport-description.ts +1 -1
- package/src/transport/tcp/tls-options-factory.ts +21 -8
- package/src/transport/tcp/tls-options.ts +11 -7
- package/src/util/json-helper.ts +6 -5
- package/src/util/message-generator.ts +6 -7
- package/tsconfig.json +2 -0
- package/.eslintrc.js +0 -6
- package/dist/buffer/ascii-chars.d.ts +0 -22
- package/dist/buffer/ascii-chars.js +0 -29
- package/dist/buffer/ascii-chars.js.map +0 -1
- package/dist/buffer/segment-description.d.ts +0 -33
- package/dist/buffer/segment-description.js +0 -80
- package/dist/buffer/segment-description.js.map +0 -1
- package/dist/buffer/segment-summary.d.ts +0 -13
- package/dist/buffer/segment-summary.js +0 -20
- package/dist/buffer/segment-summary.js.map +0 -1
- package/dist/buffer/tag-pos.d.ts +0 -12
- package/dist/buffer/tag-pos.js +0 -55
- package/dist/buffer/tag-pos.js.map +0 -1
- package/dist/buffer/tags.d.ts +0 -32
- package/dist/buffer/tags.js +0 -135
- package/dist/buffer/tags.js.map +0 -1
- package/dist/dictionary/fields-dispatch.d.ts +0 -13
- 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/test/ascii-encoder.test.d.ts +0 -1
- package/dist/test/ascii-encoder.test.js +0 -529
- 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 +0 -142
- 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 +0 -107
- package/dist/test/ascii-segment.test.js.map +0 -1
- package/dist/test/ascii-store-replay.test.d.ts +0 -1
- package/dist/test/ascii-store-replay.test.js +0 -121
- 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 +0 -105
- 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 +0 -490
- 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 +0 -45
- 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 +0 -127
- 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 +0 -160
- 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 +0 -60
- 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 +0 -33
- 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 +0 -96
- 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 +0 -42
- package/dist/test/includes.test.js.map +0 -1
- package/dist/test/logon.test.d.ts +0 -1
- package/dist/test/logon.test.js +0 -93
- 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 +0 -75
- 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 +0 -76
- 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 +0 -82
- 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 +0 -136
- 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 +0 -74
- 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 +0 -412
- 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 +0 -78
- package/dist/test/time-formatter.test.js.map +0 -1
- package/dist/test/to-views.d.ts +0 -11
- package/dist/test/to-views.js +0 -55
- 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 +0 -208
- package/dist/test/view-decode.test.js.map +0 -1
- package/dist/transport/a-session-msg-factory.d.ts +0 -23
- package/dist/transport/a-session-msg-factory.js +0 -58
- 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.d.ts +0 -15
- package/dist/transport/fix-msg-factory.js +0 -3
- package/dist/transport/fix-msg-factory.js.map +0 -1
- package/dist/transport/fix-session-state-args.d.ts +0 -8
- package/dist/transport/fix-session-state-args.js +0 -3
- package/dist/transport/fix-session-state-args.js.map +0 -1
- package/dist/transport/fix-session-state.d.ts +0 -32
- package/dist/transport/fix-session-state.js +0 -133
- package/dist/transport/fix-session-state.js.map +0 -1
- package/dist/transport/fix-session.d.ts +0 -50
- package/dist/transport/fix-session.js +0 -290
- 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-fix-session.d.ts +0 -5
- package/dist/transport/make-fix-session.js +0 -3
- package/dist/transport/make-fix-session.js.map +0 -1
- package/dist/transport/make-fixl-session.d.ts +0 -5
- package/dist/transport/make-fixl-session.js +0 -3
- package/dist/transport/make-fixl-session.js.map +0 -1
- package/dist/transport/msg-transport.d.ts +0 -14
- 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 +0 -3
- package/dist/transport/session-description.js.map +0 -1
- package/dist/transport/session-msg-factory.d.ts +0 -6
- package/dist/transport/session-msg-factory.js +0 -13
- package/dist/transport/session-msg-factory.js.map +0 -1
- package/dist/transport/session-state.d.ts +0 -25
- package/dist/transport/session-state.js +0 -30
- package/dist/transport/session-state.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/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/tslint.json +0 -3
|
@@ -56,31 +56,31 @@ export class TimeFormatter implements ITimeFormatter {
|
|
|
56
56
|
buffer.writePaddedHundreds(ms)
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
public getLocalTime (start: number): Date {
|
|
59
|
+
public getLocalTime (start: number): Date | null {
|
|
60
60
|
return this.getTime(start, false)
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
public getUtcTime (start: number): Date {
|
|
63
|
+
public getUtcTime (start: number): Date | null {
|
|
64
64
|
return this.getTime(start, true)
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
public getUtcDate (start: number): Date {
|
|
67
|
+
public getUtcDate (start: number): Date | null {
|
|
68
68
|
return this.getDate(start, true)
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
public getLocalDate (start: number): Date {
|
|
71
|
+
public getLocalDate (start: number): Date | null {
|
|
72
72
|
return this.getDate(start, false)
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
public getUtcTimestamp (start: number, end: number): Date {
|
|
76
|
-
return this.getTimestamp(start, end,true)
|
|
75
|
+
public getUtcTimestamp (start: number, end: number): Date | null {
|
|
76
|
+
return this.getTimestamp(start, end, true)
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
public getLocalTimestamp (start: number, end: number): Date {
|
|
80
|
-
return this.getTimestamp(start, end,false)
|
|
79
|
+
public getLocalTimestamp (start: number, end: number): Date | null {
|
|
80
|
+
return this.getTimestamp(start, end, false)
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
private getTimestamp (start: number, end: number, useUtc: boolean): Date {
|
|
83
|
+
private getTimestamp (start: number, end: number, useUtc: boolean): Date | null {
|
|
84
84
|
const buffer = this.buffer
|
|
85
85
|
const n: number = buffer.getWholeNumber(start, start + 7)
|
|
86
86
|
if (n == null) {
|
|
@@ -145,7 +145,7 @@ export class TimeFormatter implements ITimeFormatter {
|
|
|
145
145
|
return t
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
private getTime (start: number, useUtc: boolean): Date {
|
|
148
|
+
private getTime (start: number, useUtc: boolean): Date | null {
|
|
149
149
|
const buffer = this.buffer
|
|
150
150
|
let offset = 0
|
|
151
151
|
const hh: number = buffer.getWholeNumber(start + offset, start + offset + 1)
|
|
@@ -179,8 +179,7 @@ export class TimeFormatter implements ITimeFormatter {
|
|
|
179
179
|
return t
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
-
private getDate (start: number, useUtc: boolean): Date {
|
|
183
|
-
|
|
182
|
+
private getDate (start: number, useUtc: boolean): Date | null {
|
|
184
183
|
// = 20150417
|
|
185
184
|
|
|
186
185
|
const n: number = this.buffer.getWholeNumber(start, start + 7)
|
|
@@ -10,8 +10,7 @@ export class ElasticBuffer {
|
|
|
10
10
|
private stretched: number
|
|
11
11
|
|
|
12
12
|
constructor (@inject(DITokens.elasticBufferSize) public readonly size: number = 6 * 1024,
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
@inject(DITokens.elasticBufferReturnSize) public readonly returnTo: number = 6 * 1024) {
|
|
15
14
|
this.size = Math.max(1, this.size)
|
|
16
15
|
this.buffer = Buffer.allocUnsafe(this.size)
|
|
17
16
|
this.returnTo = Math.max(this.size, this.returnTo)
|
|
@@ -117,7 +116,7 @@ export class ElasticBuffer {
|
|
|
117
116
|
return this.ptr
|
|
118
117
|
}
|
|
119
118
|
|
|
120
|
-
public writeNumber (v: number, places: number = 13) {
|
|
119
|
+
public writeNumber (v: number, places: number = 13): number {
|
|
121
120
|
const rounded: number = Math.floor(v)
|
|
122
121
|
const fraction: number = ElasticBuffer.precisionRound(v - rounded, places)
|
|
123
122
|
if (fraction === 0) {
|
|
@@ -141,7 +140,7 @@ export class ElasticBuffer {
|
|
|
141
140
|
}
|
|
142
141
|
|
|
143
142
|
public slice (): Buffer {
|
|
144
|
-
return this.buffer.
|
|
143
|
+
return this.buffer.subarray(0, this.ptr)
|
|
145
144
|
}
|
|
146
145
|
|
|
147
146
|
public copy (): Buffer {
|
|
@@ -251,7 +250,7 @@ export class ElasticBuffer {
|
|
|
251
250
|
}
|
|
252
251
|
|
|
253
252
|
public getBuffer (start: number, end: number): Buffer {
|
|
254
|
-
return this.buffer.
|
|
253
|
+
return this.buffer.subarray(start, end)
|
|
255
254
|
}
|
|
256
255
|
|
|
257
256
|
public getBoolean (start: number): boolean {
|
|
@@ -259,7 +258,7 @@ export class ElasticBuffer {
|
|
|
259
258
|
return b === AsciiChars.Y
|
|
260
259
|
}
|
|
261
260
|
|
|
262
|
-
public getFloat (start: number, vend: number): number {
|
|
261
|
+
public getFloat (start: number, vend: number): number | null {
|
|
263
262
|
let n: number = 0
|
|
264
263
|
let digits: number = 0
|
|
265
264
|
let dotPosition: number = 0
|
|
@@ -33,14 +33,14 @@ export class EncodeProxy {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
case TagType.Boolean: {
|
|
36
|
-
if (typeof(val) !== typeof(true)) {
|
|
36
|
+
if (typeof (val) !== typeof (true)) {
|
|
37
37
|
throw new Error(`field ${field.name} expects boolean but receives "${typeof val}"`)
|
|
38
38
|
}
|
|
39
39
|
break
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
case TagType.String: {
|
|
43
|
-
if (typeof(val) !== 'string') {
|
|
43
|
+
if (typeof (val) !== 'string') {
|
|
44
44
|
throw new Error(`field ${field.name} expects string but receives "${typeof val}"`)
|
|
45
45
|
}
|
|
46
46
|
break
|
|
@@ -67,7 +67,7 @@ export class EncodeProxy {
|
|
|
67
67
|
|
|
68
68
|
private static checkProperties (wrapped: ILooseObject, val: ILooseObject): ILooseObject {
|
|
69
69
|
const keys: string[] = Object.keys(val)
|
|
70
|
-
for (
|
|
70
|
+
for (const k of keys) {
|
|
71
71
|
wrapped[k] = val[k]
|
|
72
72
|
}
|
|
73
73
|
return wrapped
|
|
@@ -108,7 +108,7 @@ export class EncodeProxy {
|
|
|
108
108
|
private static handler (set: ContainedFieldSet): Object {
|
|
109
109
|
return {
|
|
110
110
|
set (target: ILooseObject, prop: string, val: any): boolean {
|
|
111
|
-
const field: ContainedField = set.localNameToField.get(prop)
|
|
111
|
+
const field: ContainedField | null = set.localNameToField.get(prop)
|
|
112
112
|
if (!field) {
|
|
113
113
|
throw new Error(`type ${set.name} has no field named ${prop}`)
|
|
114
114
|
}
|
|
@@ -137,8 +137,9 @@ export class EncodeProxy {
|
|
|
137
137
|
}
|
|
138
138
|
return val
|
|
139
139
|
}
|
|
140
|
+
|
|
140
141
|
public wrap (msgName: string): ILooseObject {
|
|
141
|
-
const msg: MessageDefinition = this.definitions.message.get(msgName)
|
|
142
|
+
const msg: MessageDefinition | null = this.definitions.message.get(msgName)
|
|
142
143
|
if (!msg) {
|
|
143
144
|
throw new Error(`no message defined for type ${msgName}`)
|
|
144
145
|
}
|
|
@@ -2,11 +2,15 @@ export class EncodedStatus {
|
|
|
2
2
|
public ptr: number = 0
|
|
3
3
|
public bodyLengthPos: number
|
|
4
4
|
public bodyEndPos: number
|
|
5
|
-
public begin: Date
|
|
6
|
-
public end: Date
|
|
5
|
+
public begin: Date | null
|
|
6
|
+
public end: Date | null
|
|
7
7
|
public elapsed (): number {
|
|
8
|
-
|
|
8
|
+
if (this.begin && this.end) {
|
|
9
|
+
return this.begin.getTime() - this.end.getTime()
|
|
10
|
+
}
|
|
11
|
+
return 0
|
|
9
12
|
}
|
|
13
|
+
|
|
10
14
|
public reset (): void {
|
|
11
15
|
this.ptr = 0
|
|
12
16
|
this.bodyLengthPos = 0
|
|
@@ -63,12 +63,13 @@ export class FixmlEncoder extends MsgEncoder {
|
|
|
63
63
|
return moment(d).utc(true).format('YYYY-MM-DD')
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
+
return ''
|
|
66
67
|
}
|
|
67
68
|
|
|
68
69
|
public encodeSet (o: ILooseObject, set: ContainedFieldSet): void {
|
|
69
70
|
const batch: ILooseObject[] = o.Batch
|
|
70
71
|
const toWrite: ILooseObject[] = batch || [o]
|
|
71
|
-
|
|
72
|
+
const depth = batch ? 1 : 0
|
|
72
73
|
const buffer = this.buffer
|
|
73
74
|
const begin = this.beginDoc
|
|
74
75
|
const indent: string = '\t'
|
|
@@ -80,7 +81,7 @@ export class FixmlEncoder extends MsgEncoder {
|
|
|
80
81
|
this.batchStart(o, set, depth)
|
|
81
82
|
}
|
|
82
83
|
toWrite.forEach((next: ILooseObject) => {
|
|
83
|
-
this.toXml(next, set.abbreviation, set, depth + 1)
|
|
84
|
+
this.toXml(next, set.abbreviation ?? '', set, depth + 1)
|
|
84
85
|
buffer.writeString(eol)
|
|
85
86
|
})
|
|
86
87
|
if (batch) {
|
|
@@ -90,7 +91,7 @@ export class FixmlEncoder extends MsgEncoder {
|
|
|
90
91
|
buffer.writeString(this.endDoc)
|
|
91
92
|
}
|
|
92
93
|
|
|
93
|
-
private batchStart (o: ILooseObject, set: ContainedFieldSet, depth: number) {
|
|
94
|
+
private batchStart (o: ILooseObject, set: ContainedFieldSet, depth: number): void {
|
|
94
95
|
const buffer = this.buffer
|
|
95
96
|
const indent: string = '\t'
|
|
96
97
|
const beginBatch = this.beginBatch
|
|
@@ -105,7 +106,6 @@ export class FixmlEncoder extends MsgEncoder {
|
|
|
105
106
|
}
|
|
106
107
|
|
|
107
108
|
private toXml (o: ILooseObject, name: string, set: ContainedFieldSet, depth: number): void {
|
|
108
|
-
|
|
109
109
|
const buffer = this.buffer
|
|
110
110
|
const selfClose: string = '/>'
|
|
111
111
|
const close: string = '>'
|
|
@@ -131,7 +131,7 @@ export class FixmlEncoder extends MsgEncoder {
|
|
|
131
131
|
private getPopulatedFields (set: ContainedFieldSet, o: ILooseObject): ContainedField[] {
|
|
132
132
|
const keys: string[] = Object.keys(o)
|
|
133
133
|
const fields: ContainedField[] = keys.reduce((a: ContainedField[], current: string) => {
|
|
134
|
-
const field: ContainedField = set.localNameToField.get(current)
|
|
134
|
+
const field: ContainedField | null = set.localNameToField.get(current)
|
|
135
135
|
if (field && !set.nameToLocalAttribute.containsKey(current)) {
|
|
136
136
|
a.push(field)
|
|
137
137
|
}
|
|
@@ -176,7 +176,7 @@ export class FixmlEncoder extends MsgEncoder {
|
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
private getPopulatedAttributes (o: ILooseObject, attributes: ContainedSimpleField[]): IPopulatedAttributes {
|
|
179
|
-
return attributes.reduce((a: IPopulatedAttributes, f: ContainedSimpleField) => {
|
|
179
|
+
return attributes.reduce<IPopulatedAttributes>((a: IPopulatedAttributes, f: ContainedSimpleField) => {
|
|
180
180
|
let v: any = o[f.definition.name]
|
|
181
181
|
if (v == null) {
|
|
182
182
|
v = o[f.name]
|
|
@@ -189,17 +189,17 @@ export class FixmlEncoder extends MsgEncoder {
|
|
|
189
189
|
}, {
|
|
190
190
|
values: [],
|
|
191
191
|
fields: []
|
|
192
|
-
}
|
|
192
|
+
})
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
-
private complexGroup (o: ILooseObject, field: ContainedField, depth: number) {
|
|
195
|
+
private complexGroup (o: ILooseObject, field: ContainedField, depth: number): void {
|
|
196
196
|
const gf: ContainedGroupField = field as ContainedGroupField
|
|
197
197
|
const elements: ILooseObject[] = o[gf.definition.name]
|
|
198
198
|
if (elements) {
|
|
199
199
|
if (Array.isArray(elements)) {
|
|
200
200
|
for (const e of elements) {
|
|
201
201
|
this.buffer.writeString(this.eol)
|
|
202
|
-
this.toXml(e, gf.name, gf.definition,depth + 1)
|
|
202
|
+
this.toXml(e, gf.name, gf.definition, depth + 1)
|
|
203
203
|
}
|
|
204
204
|
} else {
|
|
205
205
|
throw new Error(`expected array for member ${gf.definition.name}`)
|
|
@@ -207,7 +207,7 @@ export class FixmlEncoder extends MsgEncoder {
|
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
private complexComponent (o: ILooseObject, field: ContainedField, depth: number) {
|
|
210
|
+
private complexComponent (o: ILooseObject, field: ContainedField, depth: number): void {
|
|
211
211
|
const cf: ContainedComponentField = field as ContainedComponentField
|
|
212
212
|
const def = cf.definition
|
|
213
213
|
const instance: ILooseObject = o[def.name]
|
|
@@ -2,9 +2,11 @@ import { MsgParser } from '../msg-parser'
|
|
|
2
2
|
import { Tags } from '../tag/tags'
|
|
3
3
|
import { SAXStream } from '../../dictionary'
|
|
4
4
|
import { FixDefinitions, MessageDefinition } from '../../dictionary/definition'
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
ContainedField, ContainedComponentField,
|
|
6
7
|
ContainedFieldType, ContainedGroupField,
|
|
7
|
-
ContainedSimpleField, ContainedFieldSet
|
|
8
|
+
ContainedSimpleField, ContainedFieldSet
|
|
9
|
+
} from '../../dictionary/contained'
|
|
8
10
|
import { SegmentDescription } from '../segment/segment-description'
|
|
9
11
|
import { IJsFixConfig, IJsFixLogger } from '../../config'
|
|
10
12
|
import { MsgView } from '../msg-view'
|
|
@@ -25,16 +27,16 @@ export class FiXmlParser extends MsgParser {
|
|
|
25
27
|
private readonly segments: SegmentDescription[] = []
|
|
26
28
|
private readonly segmentStack: SegmentDescription[] = []
|
|
27
29
|
private readonly logger: IJsFixLogger
|
|
28
|
-
private last: SegmentDescription
|
|
29
|
-
private raw: string
|
|
30
|
+
private last: SegmentDescription | null
|
|
31
|
+
private raw: string | null
|
|
30
32
|
|
|
31
33
|
constructor (@inject(DITokens.IJsFixConfig) public readonly config: IJsFixConfig,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
@inject(DITokens.readStream) public readonly readStream: Readable,
|
|
35
|
+
@inject(DITokens.maxMessageLocations) public readonly maxMessageLocations: number = 10 * 1024) {
|
|
34
36
|
super()
|
|
35
37
|
this.definitions = this.config.definitions
|
|
36
38
|
const description = config.description
|
|
37
|
-
const me = description
|
|
39
|
+
const me = description?.application?.name
|
|
38
40
|
this.logger = config.logFactory.logger(`${me}:FiXmlParser`)
|
|
39
41
|
this.saxStream = require('sax').createStream(true, {})
|
|
40
42
|
this.locations = new Tags(this.definitions, maxMessageLocations)
|
|
@@ -60,7 +62,7 @@ export class FiXmlParser extends MsgParser {
|
|
|
60
62
|
private subscribe (): void {
|
|
61
63
|
const writeStream = this.saxStream
|
|
62
64
|
const readStream = this.readStream
|
|
63
|
-
|
|
65
|
+
const instance = this
|
|
64
66
|
readStream.pipe(writeStream).on('ready', () => {
|
|
65
67
|
this.logger.info('stream close event')
|
|
66
68
|
this.emit('close')
|
|
@@ -138,13 +140,17 @@ export class FiXmlParser extends MsgParser {
|
|
|
138
140
|
if (stack.length === 0) {
|
|
139
141
|
throw new Error(`Hdr not expected before batch or message ${saxNode.name}`)
|
|
140
142
|
}
|
|
141
|
-
|
|
143
|
+
const peek: SegmentDescription = stack[stack.length - 1]
|
|
142
144
|
switch (peek.type) {
|
|
143
145
|
case SegmentType.Batch: {
|
|
144
146
|
// manually handle this component
|
|
145
147
|
const hdr = this.definitions.component.get('StandardHeader')
|
|
146
|
-
|
|
147
|
-
|
|
148
|
+
if (hdr) {
|
|
149
|
+
const segment: SegmentDescription | null = this.parseAttributes(saxNode.name, hdr, saxNode, SegmentType.Component)
|
|
150
|
+
if (segment) {
|
|
151
|
+
this.segmentStack.push(segment)
|
|
152
|
+
}
|
|
153
|
+
}
|
|
148
154
|
break
|
|
149
155
|
}
|
|
150
156
|
|
|
@@ -177,71 +183,75 @@ export class FiXmlParser extends MsgParser {
|
|
|
177
183
|
return new FixmlView(last, this.values, structure)
|
|
178
184
|
}
|
|
179
185
|
|
|
180
|
-
private pop (name: string): SegmentDescription {
|
|
186
|
+
private pop (name: string): SegmentDescription | null {
|
|
181
187
|
const locations = this.locations
|
|
182
188
|
const stack = this.segmentStack
|
|
183
189
|
const segments = this.segments
|
|
184
190
|
while (stack.length > 0) {
|
|
185
191
|
const pop = stack.pop()
|
|
186
192
|
const ptr = locations.nextTagPos - 1
|
|
187
|
-
pop
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
193
|
+
pop?.end(segments.length, ptr, locations.tagPos[ptr].tag)
|
|
194
|
+
if (pop) {
|
|
195
|
+
segments[segments.length] = pop
|
|
196
|
+
switch (pop.type) {
|
|
197
|
+
case SegmentType.Msg: {
|
|
198
|
+
// raise msg event
|
|
199
|
+
const last = segments[segments.length - 1]
|
|
200
|
+
this.last = last
|
|
201
|
+
this.emit('msg', last.name, this.getView())
|
|
202
|
+
if (this.raw) {
|
|
203
|
+
this.emit('decoded', this.last.name, this.raw)
|
|
204
|
+
this.raw = null
|
|
205
|
+
}
|
|
206
|
+
break
|
|
207
|
+
}
|
|
208
|
+
case SegmentType.Batch: {
|
|
209
|
+
const last = segments[segments.length - 1]
|
|
210
|
+
this.logger.debug(`emit batch with ${pop.delimiterPositions.length} elements`)
|
|
211
|
+
this.emit('batch', last?.set?.abbreviation, this.getView())
|
|
212
|
+
break
|
|
198
213
|
}
|
|
199
|
-
break
|
|
200
214
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
this.logger.debug(`emit batch with ${pop.delimiterPositions.length} elements`)
|
|
204
|
-
this.emit('batch', last.set.abbreviation, this.getView())
|
|
205
|
-
break
|
|
215
|
+
if (pop.name === name) {
|
|
216
|
+
return pop
|
|
206
217
|
}
|
|
207
218
|
}
|
|
208
|
-
if (pop.name === name) {
|
|
209
|
-
return pop
|
|
210
|
-
}
|
|
211
219
|
}
|
|
212
220
|
return null
|
|
213
221
|
}
|
|
214
222
|
|
|
215
|
-
private startGroup (saxNode: ISaxNode, gf: ContainedGroupField) {
|
|
223
|
+
private startGroup (saxNode: ISaxNode, gf: ContainedGroupField): void {
|
|
216
224
|
const locations = this.locations
|
|
217
225
|
const stack: SegmentDescription[] = this.segmentStack
|
|
218
226
|
const ptr = locations.nextTagPos
|
|
219
227
|
const def = gf.definition
|
|
220
|
-
const segment: SegmentDescription = this.parseAttributes(saxNode.name, def, saxNode, SegmentType.Component)
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
228
|
+
const segment: SegmentDescription | null = this.parseAttributes(saxNode.name, def, saxNode, SegmentType.Component)
|
|
229
|
+
if (segment) {
|
|
230
|
+
const group: SegmentDescription = new SegmentDescription(def.name,
|
|
231
|
+
locations.tagPos[ptr].tag,
|
|
232
|
+
def,
|
|
233
|
+
ptr,
|
|
234
|
+
stack.length,
|
|
235
|
+
SegmentType.Group)
|
|
236
|
+
group.startGroup(locations.tagPos[ptr].tag)
|
|
237
|
+
group.addDelimiterPosition(ptr)
|
|
238
|
+
stack.push(group)
|
|
239
|
+
stack.push(segment)
|
|
240
|
+
}
|
|
231
241
|
}
|
|
232
242
|
|
|
233
|
-
private getNextField (saxNode: ISaxNode): ContainedField {
|
|
243
|
+
private getNextField (saxNode: ISaxNode): ContainedField | null {
|
|
234
244
|
const stack: SegmentDescription[] = this.segmentStack
|
|
235
245
|
while (stack.length > 0) {
|
|
236
|
-
|
|
237
|
-
|
|
246
|
+
const peek: SegmentDescription = stack[stack.length - 1]
|
|
247
|
+
const field = peek?.set?.localNameToField.get(saxNode.name)
|
|
238
248
|
if (field) {
|
|
239
249
|
return field
|
|
240
250
|
}
|
|
241
251
|
// if this is a group of the same type as already on stack
|
|
242
252
|
// take the field from the next level up
|
|
243
253
|
if (peek.type === SegmentType.Group && stack.length > 1) {
|
|
244
|
-
const contained = stack[stack.length - 2]
|
|
254
|
+
const contained = stack[stack.length - 2]?.set?.localNameToField.get(saxNode.name)
|
|
245
255
|
if (contained instanceof ContainedGroupField) {
|
|
246
256
|
if (contained.definition.name === peek.name) {
|
|
247
257
|
// this is the same type for next instance in the same group.
|
|
@@ -254,18 +264,22 @@ export class FiXmlParser extends MsgParser {
|
|
|
254
264
|
const ptr = locations.nextTagPos - 1
|
|
255
265
|
const pop = stack.pop()
|
|
256
266
|
const segments = this.segments
|
|
257
|
-
pop
|
|
258
|
-
|
|
267
|
+
if (pop) {
|
|
268
|
+
pop.end(segments.length, ptr, locations.tagPos[ptr].tag)
|
|
269
|
+
segments[segments.length] = pop
|
|
270
|
+
}
|
|
259
271
|
}
|
|
260
272
|
return null
|
|
261
273
|
}
|
|
262
274
|
|
|
263
|
-
private dispatch (saxNode: ISaxNode, field: ContainedField) {
|
|
275
|
+
private dispatch (saxNode: ISaxNode, field: ContainedField): void {
|
|
264
276
|
switch (field.type) {
|
|
265
277
|
case ContainedFieldType.Component: {
|
|
266
278
|
const cf: ContainedComponentField = field as ContainedComponentField
|
|
267
|
-
const segment: SegmentDescription = this.parseAttributes(saxNode.name, cf.definition, saxNode, SegmentType.Component)
|
|
268
|
-
|
|
279
|
+
const segment: SegmentDescription | null = this.parseAttributes(saxNode.name, cf.definition, saxNode, SegmentType.Component)
|
|
280
|
+
if (segment) {
|
|
281
|
+
this.segmentStack.push(segment)
|
|
282
|
+
}
|
|
269
283
|
break
|
|
270
284
|
}
|
|
271
285
|
|
|
@@ -290,7 +304,10 @@ export class FiXmlParser extends MsgParser {
|
|
|
290
304
|
if (gf.name === saxNode.name) {
|
|
291
305
|
const ptr = this.locations.nextTagPos
|
|
292
306
|
peek.addDelimiterPosition(ptr)
|
|
293
|
-
|
|
307
|
+
const a = this.parseAttributes(saxNode.name, gf.definition, saxNode, SegmentType.Component)
|
|
308
|
+
if (a) {
|
|
309
|
+
stack.push(a)
|
|
310
|
+
}
|
|
294
311
|
} else {
|
|
295
312
|
throw new Error(`expected another group instance of ${gf.name} but got ${saxNode.name}`)
|
|
296
313
|
}
|
|
@@ -307,8 +324,8 @@ export class FiXmlParser extends MsgParser {
|
|
|
307
324
|
const field = this.getNextField(saxNode)
|
|
308
325
|
if (!field) {
|
|
309
326
|
const stack: SegmentDescription[] = this.segmentStack
|
|
310
|
-
|
|
311
|
-
throw new Error(`field ${saxNode.name} not known in set ${peek
|
|
327
|
+
const peek: SegmentDescription = stack[stack.length - 1]
|
|
328
|
+
throw new Error(`field ${saxNode.name} not known in set ${peek?.set?.name}`)
|
|
312
329
|
}
|
|
313
330
|
this.dispatch(saxNode, field)
|
|
314
331
|
}
|
|
@@ -316,7 +333,7 @@ export class FiXmlParser extends MsgParser {
|
|
|
316
333
|
private msg (saxNode: ISaxNode, inBatch: boolean = false): void {
|
|
317
334
|
this.logger.debug(`${saxNode.name}: begin parse msg`)
|
|
318
335
|
const type: string = saxNode.name
|
|
319
|
-
const def: MessageDefinition = this.definitions.message.get(type)
|
|
336
|
+
const def: MessageDefinition | null = this.definitions.message.get(type)
|
|
320
337
|
if (!def) {
|
|
321
338
|
throw new Error(`unknown message type ${type}`)
|
|
322
339
|
}
|
|
@@ -324,11 +341,13 @@ export class FiXmlParser extends MsgParser {
|
|
|
324
341
|
const batch = this.segmentStack[0]
|
|
325
342
|
batch.set = def
|
|
326
343
|
}
|
|
327
|
-
const segment: SegmentDescription = this.parseAttributes(type, def, saxNode, SegmentType.Msg)
|
|
328
|
-
|
|
344
|
+
const segment: SegmentDescription | null = this.parseAttributes(type, def, saxNode, SegmentType.Msg)
|
|
345
|
+
if (segment) {
|
|
346
|
+
this.segmentStack.push(segment)
|
|
347
|
+
}
|
|
329
348
|
}
|
|
330
349
|
|
|
331
|
-
private parseAttributes (name: string, set: ContainedFieldSet, saxNode: ISaxNode, type: SegmentType): SegmentDescription {
|
|
350
|
+
private parseAttributes (name: string, set: ContainedFieldSet, saxNode: ISaxNode, type: SegmentType): SegmentDescription | null {
|
|
332
351
|
const locations = this.locations
|
|
333
352
|
const attributes = saxNode.attributes
|
|
334
353
|
const values = this.values
|
|
@@ -350,5 +369,6 @@ export class FiXmlParser extends MsgParser {
|
|
|
350
369
|
}
|
|
351
370
|
return new SegmentDescription(name, locations.tagPos[ptr].tag, set, ptr, this.segmentStack.length, type)
|
|
352
371
|
}
|
|
372
|
+
return null
|
|
353
373
|
}
|
|
354
374
|
}
|
|
@@ -7,26 +7,25 @@ import * as moment from 'moment'
|
|
|
7
7
|
import { TagType } from '../tag/tag-type'
|
|
8
8
|
|
|
9
9
|
export class FixmlView extends MsgView {
|
|
10
|
-
|
|
11
10
|
constructor (public readonly segment: SegmentDescription,
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
public readonly values: string[],
|
|
12
|
+
public readonly structure: Structure) {
|
|
14
13
|
super(segment, structure)
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
private static getTimestamp (s: string, useUtc: boolean): Date {
|
|
18
|
-
|
|
17
|
+
const m = moment(s)
|
|
19
18
|
return useUtc ? m.utc(true).toDate() : m.toDate()
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
// 01:00:08.201
|
|
23
22
|
private static getTimeOnly (s: string, useUtc: boolean): Date {
|
|
24
|
-
|
|
23
|
+
const m = moment(s, [moment.HTML5_FMT.TIME_MS, moment.HTML5_FMT.TIME_SECONDS])
|
|
25
24
|
return useUtc ? m.utc(true).toDate() : m.toDate()
|
|
26
25
|
}
|
|
27
26
|
|
|
28
27
|
private static getDateOnly (s: string, useUtc: boolean): Date {
|
|
29
|
-
|
|
28
|
+
const m = moment(s)
|
|
30
29
|
let d: Date
|
|
31
30
|
if (useUtc) {
|
|
32
31
|
d = m.utc(true).toDate()
|
|
@@ -45,7 +44,7 @@ export class FixmlView extends MsgView {
|
|
|
45
44
|
return 0
|
|
46
45
|
}
|
|
47
46
|
|
|
48
|
-
protected create (singleton: SegmentDescription) {
|
|
47
|
+
protected create (singleton: SegmentDescription): FixmlView {
|
|
49
48
|
return new FixmlView(singleton,
|
|
50
49
|
this.values,
|
|
51
50
|
this.structure)
|
|
@@ -9,7 +9,8 @@ export abstract class MsgEncoder extends events.EventEmitter {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
public encode (o: ILooseObject, name: string): void {
|
|
12
|
-
const set: ContainedFieldSet = this.definitions.message.get(name)
|
|
12
|
+
const set: ContainedFieldSet | null = this.definitions.message.get(name) ??
|
|
13
|
+
this.definitions.component.get(name)
|
|
13
14
|
if (!set) {
|
|
14
15
|
return
|
|
15
16
|
}
|