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
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { INumericKeyed } from '../collections/collection';
|
|
2
|
-
import { ContainedField, ContainedFieldSet } from '../dictionary';
|
|
3
|
-
export declare enum SegmentType {
|
|
4
|
-
Component = 0,
|
|
5
|
-
Group = 1,
|
|
6
|
-
Msg = 2,
|
|
7
|
-
Gap = 3,
|
|
8
|
-
Batch = 4,
|
|
9
|
-
Unknown = 5
|
|
10
|
-
}
|
|
11
|
-
export declare class SegmentDescription {
|
|
12
|
-
name: string;
|
|
13
|
-
startTag: number;
|
|
14
|
-
set: ContainedFieldSet;
|
|
15
|
-
startPosition: number;
|
|
16
|
-
readonly depth: number;
|
|
17
|
-
readonly type: SegmentType;
|
|
18
|
-
index: number;
|
|
19
|
-
endTag: number;
|
|
20
|
-
endPosition: number;
|
|
21
|
-
delimiterTag: number;
|
|
22
|
-
delimiterPositions: number[];
|
|
23
|
-
currentField: ContainedField;
|
|
24
|
-
containedDelimiterPositions: INumericKeyed<boolean>;
|
|
25
|
-
constructor(name: string, startTag: number, set: ContainedFieldSet, startPosition: number, depth: number, type: SegmentType);
|
|
26
|
-
contains(segment: SegmentDescription): boolean;
|
|
27
|
-
getInstance(instance: number): SegmentDescription;
|
|
28
|
-
startGroup(tag: number): void;
|
|
29
|
-
addDelimiterPosition(position: number): boolean;
|
|
30
|
-
setCurrentField(tag: number): void;
|
|
31
|
-
groupAddDelimiter(tag: number, position: number): boolean;
|
|
32
|
-
end(i: number, pos: number, endTag: number): void;
|
|
33
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SegmentDescription = exports.SegmentType = void 0;
|
|
4
|
-
const dictionary_1 = require("../dictionary");
|
|
5
|
-
var SegmentType;
|
|
6
|
-
(function (SegmentType) {
|
|
7
|
-
SegmentType[SegmentType["Component"] = 0] = "Component";
|
|
8
|
-
SegmentType[SegmentType["Group"] = 1] = "Group";
|
|
9
|
-
SegmentType[SegmentType["Msg"] = 2] = "Msg";
|
|
10
|
-
SegmentType[SegmentType["Gap"] = 3] = "Gap";
|
|
11
|
-
SegmentType[SegmentType["Batch"] = 4] = "Batch";
|
|
12
|
-
SegmentType[SegmentType["Unknown"] = 5] = "Unknown";
|
|
13
|
-
})(SegmentType = exports.SegmentType || (exports.SegmentType = {}));
|
|
14
|
-
class SegmentDescription {
|
|
15
|
-
constructor(name, startTag, set, startPosition, depth, type) {
|
|
16
|
-
this.name = name;
|
|
17
|
-
this.startTag = startTag;
|
|
18
|
-
this.set = set;
|
|
19
|
-
this.startPosition = startPosition;
|
|
20
|
-
this.depth = depth;
|
|
21
|
-
this.type = type;
|
|
22
|
-
this.endTag = 0;
|
|
23
|
-
this.endPosition = 0;
|
|
24
|
-
this.delimiterTag = 0;
|
|
25
|
-
}
|
|
26
|
-
contains(segment) {
|
|
27
|
-
return segment.startPosition >= this.startPosition && segment.endPosition <= this.endPosition;
|
|
28
|
-
}
|
|
29
|
-
getInstance(instance) {
|
|
30
|
-
const delimiters = this.delimiterPositions;
|
|
31
|
-
if (!delimiters) {
|
|
32
|
-
return null;
|
|
33
|
-
}
|
|
34
|
-
if (instance < 0 || instance >= delimiters.length) {
|
|
35
|
-
return null;
|
|
36
|
-
}
|
|
37
|
-
const start = delimiters[instance];
|
|
38
|
-
const end = instance < delimiters.length - 1 ?
|
|
39
|
-
delimiters[instance + 1] - 1 :
|
|
40
|
-
this.endPosition;
|
|
41
|
-
const name = this.type === SegmentType.Batch ? this.set.abbreviation : this.name;
|
|
42
|
-
const d = new SegmentDescription(name, this.startTag, this.set, start, this.depth, this.type);
|
|
43
|
-
d.endPosition = end;
|
|
44
|
-
d.endTag = this.endTag;
|
|
45
|
-
return d;
|
|
46
|
-
}
|
|
47
|
-
startGroup(tag) {
|
|
48
|
-
this.delimiterTag = tag;
|
|
49
|
-
this.delimiterPositions = [];
|
|
50
|
-
this.containedDelimiterPositions = {};
|
|
51
|
-
}
|
|
52
|
-
addDelimiterPosition(position) {
|
|
53
|
-
if (this.containedDelimiterPositions[position]) {
|
|
54
|
-
return false;
|
|
55
|
-
}
|
|
56
|
-
this.delimiterPositions[this.delimiterPositions.length] = position;
|
|
57
|
-
this.containedDelimiterPositions[position] = true;
|
|
58
|
-
return true;
|
|
59
|
-
}
|
|
60
|
-
setCurrentField(tag) {
|
|
61
|
-
this.currentField = this.set.localTag[tag] || this.set.tagToField[tag];
|
|
62
|
-
}
|
|
63
|
-
groupAddDelimiter(tag, position) {
|
|
64
|
-
let delimiter = false;
|
|
65
|
-
if (this.set instanceof dictionary_1.GroupFieldDefinition) {
|
|
66
|
-
if (this.delimiterTag && tag === this.delimiterTag) {
|
|
67
|
-
delimiter = this.addDelimiterPosition(position);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
return delimiter;
|
|
71
|
-
}
|
|
72
|
-
end(i, pos, endTag) {
|
|
73
|
-
this.index = i;
|
|
74
|
-
this.currentField = null;
|
|
75
|
-
this.endPosition = pos;
|
|
76
|
-
this.endTag = endTag;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
exports.SegmentDescription = SegmentDescription;
|
|
80
|
-
//# sourceMappingURL=segment-description.js.map
|
|
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AiB,CAAE,GAAW,EAAE,QAAgB;QACrD,IAAI,SAAS,GAAY,KAAK,CAAA;QAC9B,IAAI,IAAI,CAAC,GAAG,YAAY,iCAAoB,EAAE;YAC5C,IAAI,IAAI,CAAC,YAAY,IAAI,GAAG,KAAK,IAAI,CAAC,YAAY,EAAE;gBAClD,SAAS,GAAG,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAA;aAChD;SACF;QACD,OAAO,SAAS,CAAA;IAClB,CAAC;IAEM,GAAG,CAAE,CAAS,EAAE,GAAW,EAAE,MAAc;QAChD,IAAI,CAAC,KAAK,GAAG,CAAC,CAAA;QACd,IAAI,CAAC,YAAY,GAAG,IAAI,CAAA;QACxB,IAAI,CAAC,WAAW,GAAG,GAAG,CAAA;QACtB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;CACF;AA5ED,gDA4EC","sourcesContent":["import { INumericKeyed } from '../collections/collection'\r\nimport { ContainedField, ContainedFieldSet, GroupFieldDefinition } from '../dictionary'\r\n\r\nexport enum SegmentType {\r\n Component = 0,\r\n Group = 1,\r\n Msg = 2,\r\n Gap = 3,\r\n Batch = 4,\r\n Unknown = 5\r\n}\r\n\r\nexport class SegmentDescription {\r\n public index: number\r\n public endTag: number = 0\r\n public endPosition: number = 0\r\n public delimiterTag: number = 0\r\n public delimiterPositions: number[]\r\n public currentField: ContainedField\r\n public containedDelimiterPositions: INumericKeyed<boolean>\r\n\r\n constructor (\r\n public name: string,\r\n public startTag: number,\r\n public set: ContainedFieldSet,\r\n public startPosition: number,\r\n public readonly depth: number,\r\n public readonly type: SegmentType) {\r\n }\r\n\r\n public contains (segment: SegmentDescription): boolean {\r\n return segment.startPosition >= this.startPosition && segment.endPosition <= this.endPosition\r\n }\r\n\r\n public getInstance (instance: number): SegmentDescription {\r\n const delimiters: number[] = this.delimiterPositions\r\n if (!delimiters) {\r\n return null\r\n }\r\n if (instance < 0 || instance >= delimiters.length) {\r\n return null\r\n }\r\n const start: number = delimiters[instance]\r\n const end: number = instance < delimiters.length - 1 ?\r\n delimiters[instance + 1] - 1 :\r\n this.endPosition\r\n const name = this.type === SegmentType.Batch ? this.set.abbreviation : this.name\r\n const d: SegmentDescription = new SegmentDescription(name, this.startTag, this.set, start, this.depth, this.type)\r\n d.endPosition = end\r\n d.endTag = this.endTag\r\n return d\r\n }\r\n\r\n public startGroup (tag: number): void {\r\n this.delimiterTag = tag\r\n this.delimiterPositions = []\r\n this.containedDelimiterPositions = {}\r\n }\r\n\r\n public addDelimiterPosition (position: number): boolean {\r\n if (this.containedDelimiterPositions[position]) {\r\n return false\r\n }\r\n this.delimiterPositions[this.delimiterPositions.length] = position\r\n this.containedDelimiterPositions[position] = true\r\n return true\r\n }\r\n\r\n public setCurrentField (tag: number): void {\r\n this.currentField = this.set.localTag[tag] || this.set.tagToField[tag]\r\n }\r\n\r\n public groupAddDelimiter (tag: number, position: number): boolean {\r\n let delimiter: boolean = false\r\n if (this.set instanceof GroupFieldDefinition) {\r\n if (this.delimiterTag && tag === this.delimiterTag) {\r\n delimiter = this.addDelimiterPosition(position)\r\n }\r\n }\r\n return delimiter\r\n }\r\n\r\n public end (i: number, pos: number, endTag: number): void {\r\n this.index = i\r\n this.currentField = null\r\n this.endPosition = pos\r\n this.endTag = endTag\r\n }\r\n}\r\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { SegmentDescription } from './segment-description';
|
|
2
|
-
export declare class SegmentSummary {
|
|
3
|
-
readonly name: string;
|
|
4
|
-
readonly depth: number;
|
|
5
|
-
readonly startTag: number;
|
|
6
|
-
readonly startPosition: number;
|
|
7
|
-
readonly endTag: number;
|
|
8
|
-
readonly endPosition: number;
|
|
9
|
-
readonly delimiterTag: number;
|
|
10
|
-
readonly delimiterPositions: number[];
|
|
11
|
-
constructor(name: string, depth: number, startTag: number, startPosition: number, endTag: number, endPosition: number, delimiterTag: number, delimiterPositions: number[]);
|
|
12
|
-
static fromDescription(d: SegmentDescription): SegmentSummary;
|
|
13
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SegmentSummary = void 0;
|
|
4
|
-
class SegmentSummary {
|
|
5
|
-
constructor(name, depth, startTag, startPosition, endTag, endPosition, delimiterTag, delimiterPositions) {
|
|
6
|
-
this.name = name;
|
|
7
|
-
this.depth = depth;
|
|
8
|
-
this.startTag = startTag;
|
|
9
|
-
this.startPosition = startPosition;
|
|
10
|
-
this.endTag = endTag;
|
|
11
|
-
this.endPosition = endPosition;
|
|
12
|
-
this.delimiterTag = delimiterTag;
|
|
13
|
-
this.delimiterPositions = delimiterPositions;
|
|
14
|
-
}
|
|
15
|
-
static fromDescription(d) {
|
|
16
|
-
return new SegmentSummary(d.set.name, d.depth, d.startTag, d.startPosition, d.endTag, d.endPosition, d.delimiterTag, d.delimiterPositions || []);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
exports.SegmentSummary = SegmentSummary;
|
|
20
|
-
//# sourceMappingURL=segment-summary.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"segment-summary.js","sourceRoot":"","sources":["../../src/buffer/segment-summary.ts"],"names":[],"mappings":";;;AAEA,MAAa,cAAc;IACzB,YACkB,IAAY,EACZ,KAAa,EACb,QAAgB,EAChB,aAAqB,EACrB,MAAc,EACd,WAAmB,EACnB,YAAoB,EACpB,kBAA4B;QAP5B,SAAI,GAAJ,IAAI,CAAQ;QACZ,UAAK,GAAL,KAAK,CAAQ;QACb,aAAQ,GAAR,QAAQ,CAAQ;QAChB,kBAAa,GAAb,aAAa,CAAQ;QACrB,WAAM,GAAN,MAAM,CAAQ;QACd,gBAAW,GAAX,WAAW,CAAQ;QACnB,iBAAY,GAAZ,YAAY,CAAQ;QACpB,uBAAkB,GAAlB,kBAAkB,CAAU;IAC9C,CAAC;IACM,MAAM,CAAC,eAAe,CAAE,CAAqB;QAClD,OAAO,IAAI,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,aAAa,EAClE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC,kBAAkB,IAAI,EAAE,CAAC,CAAA;IAC9E,CAAC;CACF;AAfD,wCAeC","sourcesContent":["import { SegmentDescription } from './segment-description'\r\n\r\nexport class SegmentSummary {\r\n constructor (\r\n public readonly name: string,\r\n public readonly depth: number,\r\n public readonly startTag: number,\r\n public readonly startPosition: number,\r\n public readonly endTag: number,\r\n public readonly endPosition: number,\r\n public readonly delimiterTag: number,\r\n public readonly delimiterPositions: number[]) {\r\n }\r\n public static fromDescription (d: SegmentDescription): SegmentSummary {\r\n return new SegmentSummary(d.set.name, d.depth, d.startTag, d.startPosition,\r\n d.endTag, d.endPosition, d.delimiterTag, d.delimiterPositions || [])\r\n }\r\n}\r\n"]}
|
package/dist/buffer/tag-pos.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare class TagPos {
|
|
2
|
-
position: number;
|
|
3
|
-
tag: number;
|
|
4
|
-
start: number;
|
|
5
|
-
len: number;
|
|
6
|
-
constructor(position: number, tag: number, start: number, len: number);
|
|
7
|
-
static compare(lhs: TagPos, rhs: TagPos): number;
|
|
8
|
-
static binarySearch(ar: TagPos[], tag: number): number;
|
|
9
|
-
assign(position: number, tag: number, start: number, len: number): void;
|
|
10
|
-
toString(): string;
|
|
11
|
-
clone(): TagPos;
|
|
12
|
-
}
|
package/dist/buffer/tag-pos.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TagPos = void 0;
|
|
4
|
-
class TagPos {
|
|
5
|
-
constructor(position, tag, start, len) {
|
|
6
|
-
this.position = position;
|
|
7
|
-
this.tag = tag;
|
|
8
|
-
this.start = start;
|
|
9
|
-
this.len = len;
|
|
10
|
-
}
|
|
11
|
-
static compare(lhs, rhs) {
|
|
12
|
-
if (lhs.tag < rhs.tag) {
|
|
13
|
-
return -1;
|
|
14
|
-
}
|
|
15
|
-
if (lhs.tag > rhs.tag) {
|
|
16
|
-
return 1;
|
|
17
|
-
}
|
|
18
|
-
if (lhs.tag === rhs.tag && lhs.start === rhs.start) {
|
|
19
|
-
return 0;
|
|
20
|
-
}
|
|
21
|
-
return ((lhs.start < rhs.start) ? -1 : ((lhs.start > rhs.start) ? 1 : 0));
|
|
22
|
-
}
|
|
23
|
-
static binarySearch(ar, tag) {
|
|
24
|
-
let m = 0;
|
|
25
|
-
let n = ar.length - 1;
|
|
26
|
-
while (m <= n) {
|
|
27
|
-
const k = (n + m) >> 1;
|
|
28
|
-
const cmp = tag - (ar[k].tag);
|
|
29
|
-
if (cmp > 0) {
|
|
30
|
-
m = k + 1;
|
|
31
|
-
}
|
|
32
|
-
else if (cmp < 0) {
|
|
33
|
-
n = k - 1;
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
return k;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return -m - 1;
|
|
40
|
-
}
|
|
41
|
-
assign(position, tag, start, len) {
|
|
42
|
-
this.position = position;
|
|
43
|
-
this.tag = tag;
|
|
44
|
-
this.start = start;
|
|
45
|
-
this.len = len;
|
|
46
|
-
}
|
|
47
|
-
toString() {
|
|
48
|
-
return `[${this.position}] = ${this.tag} (${this.start}..${this.start + this.len})`;
|
|
49
|
-
}
|
|
50
|
-
clone() {
|
|
51
|
-
return new TagPos(this.position, this.tag, this.start, this.len);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
exports.TagPos = TagPos;
|
|
55
|
-
//# sourceMappingURL=tag-pos.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tag-pos.js","sourceRoot":"","sources":["../../src/bu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AG,GAAG,CAAC,EAAE;gBACX,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;aACV;iBAAM,IAAI,GAAG,GAAG,CAAC,EAAE;gBAClB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;aACV;iBAAM;gBACL,OAAO,CAAC,CAAA;aACT;SACF;QACD,OAAO,CAAC,CAAC,GAAG,CAAC,CAAA;IACf,CAAC;IAEM,MAAM,CAAE,QAAgB,EAAE,GAAW,EAAE,KAAa,EAAE,GAAW;QACtE,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;QACd,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QAClB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;IAChB,CAAC;IAEM,QAAQ;QACb,OAAO,IAAI,IAAI,CAAC,QAAQ,OAAO,IAAI,CAAC,GAAG,KAAK,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,GAAG,CAAA;IACrF,CAAC;IAEM,KAAK;QACV,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAA;IAClE,CAAC;CACF;AAhDD,wBAgDC","sourcesContent":["export class TagPos {\r\n constructor (public position: number, public tag: number, public start: number, public len: number) {\r\n }\r\n\r\n public static compare (lhs: TagPos, rhs: TagPos): number {\r\n if (lhs.tag < rhs.tag) {\r\n return -1\r\n }\r\n if (lhs.tag > rhs.tag) {\r\n return 1\r\n }\r\n if (lhs.tag === rhs.tag && lhs.start === rhs.start) {\r\n return 0\r\n }\r\n return ((lhs.start < rhs.start) ? -1 : ((lhs.start > rhs.start) ? 1 : 0))\r\n }\r\n\r\n public static binarySearch (ar: TagPos[], tag: number): number {\r\n let m: number = 0\r\n let n: number = ar.length - 1\r\n while (m <= n) {\r\n const k: number = (n + m) >> 1\r\n const cmp: number = tag - (ar[k].tag)\r\n if (cmp > 0) {\r\n m = k + 1\r\n } else if (cmp < 0) {\r\n n = k - 1\r\n } else {\r\n return k\r\n }\r\n }\r\n return -m - 1\r\n }\r\n\r\n public assign (position: number, tag: number, start: number, len: number): void {\r\n this.position = position\r\n this.tag = tag\r\n this.start = start\r\n this.len = len\r\n }\r\n\r\n public toString (): string {\r\n return `[${this.position}] = ${this.tag} (${this.start}..${this.start + this.len})`\r\n }\r\n\r\n public clone (): TagPos {\r\n return new TagPos(this.position, this.tag, this.start, this.len)\r\n }\r\n}\r\n"]}
|
package/dist/buffer/tags.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { FixDefinitions, ContainedSimpleField } from '../dictionary';
|
|
2
|
-
import { TagPos } from './tag-pos';
|
|
3
|
-
export declare enum TagType {
|
|
4
|
-
String = 1,
|
|
5
|
-
Int = 2,
|
|
6
|
-
Float = 3,
|
|
7
|
-
Boolean = 4,
|
|
8
|
-
UtcTimestamp = 5,
|
|
9
|
-
UtcDateOnly = 6,
|
|
10
|
-
UtcTimeOnly = 7,
|
|
11
|
-
LocalDate = 8,
|
|
12
|
-
RawData = 9,
|
|
13
|
-
Length = 10,
|
|
14
|
-
Unknown = 11
|
|
15
|
-
}
|
|
16
|
-
export declare class Tags {
|
|
17
|
-
readonly definitions: FixDefinitions;
|
|
18
|
-
readonly startingLength: number;
|
|
19
|
-
static readonly BeginString: number;
|
|
20
|
-
static readonly BodyLengthTag: number;
|
|
21
|
-
static readonly CheckSumTag: number;
|
|
22
|
-
static readonly MsgTag: number;
|
|
23
|
-
tagPos: TagPos[];
|
|
24
|
-
nextTagPos: number;
|
|
25
|
-
constructor(definitions: FixDefinitions, startingLength?: number);
|
|
26
|
-
static toJSType(simple: ContainedSimpleField): string;
|
|
27
|
-
static toType(type: string): TagType;
|
|
28
|
-
clone(): Tags;
|
|
29
|
-
reset(): void;
|
|
30
|
-
store(start: number, len: number, tag: number): void;
|
|
31
|
-
private expand;
|
|
32
|
-
}
|
package/dist/buffer/tags.js
DELETED
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Tags = exports.TagType = void 0;
|
|
4
|
-
const tag_pos_1 = require("./tag-pos");
|
|
5
|
-
const types_1 = require("../types");
|
|
6
|
-
var TagType;
|
|
7
|
-
(function (TagType) {
|
|
8
|
-
TagType[TagType["String"] = 1] = "String";
|
|
9
|
-
TagType[TagType["Int"] = 2] = "Int";
|
|
10
|
-
TagType[TagType["Float"] = 3] = "Float";
|
|
11
|
-
TagType[TagType["Boolean"] = 4] = "Boolean";
|
|
12
|
-
TagType[TagType["UtcTimestamp"] = 5] = "UtcTimestamp";
|
|
13
|
-
TagType[TagType["UtcDateOnly"] = 6] = "UtcDateOnly";
|
|
14
|
-
TagType[TagType["UtcTimeOnly"] = 7] = "UtcTimeOnly";
|
|
15
|
-
TagType[TagType["LocalDate"] = 8] = "LocalDate";
|
|
16
|
-
TagType[TagType["RawData"] = 9] = "RawData";
|
|
17
|
-
TagType[TagType["Length"] = 10] = "Length";
|
|
18
|
-
TagType[TagType["Unknown"] = 11] = "Unknown";
|
|
19
|
-
})(TagType = exports.TagType || (exports.TagType = {}));
|
|
20
|
-
class Tags {
|
|
21
|
-
constructor(definitions, startingLength = 30 * 1000) {
|
|
22
|
-
this.definitions = definitions;
|
|
23
|
-
this.startingLength = startingLength;
|
|
24
|
-
this.tagPos = new Array(this.startingLength);
|
|
25
|
-
this.nextTagPos = 0;
|
|
26
|
-
}
|
|
27
|
-
static toJSType(simple) {
|
|
28
|
-
switch (simple.definition.tagType) {
|
|
29
|
-
case TagType.String:
|
|
30
|
-
return 'string';
|
|
31
|
-
case TagType.Int:
|
|
32
|
-
case TagType.Float:
|
|
33
|
-
case TagType.Length:
|
|
34
|
-
return 'number';
|
|
35
|
-
case TagType.RawData:
|
|
36
|
-
return 'Buffer';
|
|
37
|
-
case TagType.Boolean:
|
|
38
|
-
return 'boolean';
|
|
39
|
-
case TagType.UtcTimestamp:
|
|
40
|
-
case TagType.UtcDateOnly:
|
|
41
|
-
case TagType.UtcTimeOnly:
|
|
42
|
-
case TagType.LocalDate:
|
|
43
|
-
return 'Date';
|
|
44
|
-
default:
|
|
45
|
-
return 'string';
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
static toType(type) {
|
|
49
|
-
type = type || 'string';
|
|
50
|
-
switch (type.toLowerCase()) {
|
|
51
|
-
case 'currency':
|
|
52
|
-
case 'string':
|
|
53
|
-
case 'char': {
|
|
54
|
-
return TagType.String;
|
|
55
|
-
}
|
|
56
|
-
case 'int':
|
|
57
|
-
case 'numingroup':
|
|
58
|
-
case 'seqnum': {
|
|
59
|
-
return TagType.Int;
|
|
60
|
-
}
|
|
61
|
-
case 'qty':
|
|
62
|
-
case 'percentage':
|
|
63
|
-
case 'amt':
|
|
64
|
-
case 'price':
|
|
65
|
-
case 'priceoffset':
|
|
66
|
-
case 'float': {
|
|
67
|
-
return TagType.Float;
|
|
68
|
-
}
|
|
69
|
-
case 'length': {
|
|
70
|
-
return TagType.Length;
|
|
71
|
-
}
|
|
72
|
-
case 'boolean': {
|
|
73
|
-
return TagType.Boolean;
|
|
74
|
-
}
|
|
75
|
-
case 'utctimestamp': {
|
|
76
|
-
return TagType.UtcTimestamp;
|
|
77
|
-
}
|
|
78
|
-
case 'localmktdate': {
|
|
79
|
-
return TagType.LocalDate;
|
|
80
|
-
}
|
|
81
|
-
case 'utcdateonly': {
|
|
82
|
-
return TagType.UtcDateOnly;
|
|
83
|
-
}
|
|
84
|
-
case 'utctimeonly': {
|
|
85
|
-
return TagType.UtcTimeOnly;
|
|
86
|
-
}
|
|
87
|
-
case 'data': {
|
|
88
|
-
return TagType.RawData;
|
|
89
|
-
}
|
|
90
|
-
default: {
|
|
91
|
-
return TagType.String;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
clone() {
|
|
96
|
-
const next = this.nextTagPos;
|
|
97
|
-
const cloned = new Tags(this.definitions, next);
|
|
98
|
-
cloned.nextTagPos = next;
|
|
99
|
-
for (let i = 0; i < next; ++i) {
|
|
100
|
-
cloned.tagPos[i] = this.tagPos[i].clone();
|
|
101
|
-
}
|
|
102
|
-
return cloned;
|
|
103
|
-
}
|
|
104
|
-
reset() {
|
|
105
|
-
this.nextTagPos = 0;
|
|
106
|
-
}
|
|
107
|
-
store(start, len, tag) {
|
|
108
|
-
const tagPtr = this.nextTagPos;
|
|
109
|
-
if (tagPtr === this.tagPos.length) {
|
|
110
|
-
this.expand();
|
|
111
|
-
}
|
|
112
|
-
const tp = this.tagPos[tagPtr];
|
|
113
|
-
if (tp) {
|
|
114
|
-
tp.assign(tagPtr, tag, start, len);
|
|
115
|
-
}
|
|
116
|
-
else {
|
|
117
|
-
this.tagPos[tagPtr] = new tag_pos_1.TagPos(tagPtr, tag, start, len);
|
|
118
|
-
}
|
|
119
|
-
this.nextTagPos++;
|
|
120
|
-
}
|
|
121
|
-
expand() {
|
|
122
|
-
const size = this.tagPos.length * 2;
|
|
123
|
-
const tagPos = new Array(size);
|
|
124
|
-
for (let i = 0; i < this.tagPos.length; ++i) {
|
|
125
|
-
tagPos[i] = this.tagPos[i];
|
|
126
|
-
}
|
|
127
|
-
this.tagPos = tagPos;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
exports.Tags = Tags;
|
|
131
|
-
Tags.BeginString = types_1.MsgTag.BeginString;
|
|
132
|
-
Tags.BodyLengthTag = types_1.MsgTag.BodyLength;
|
|
133
|
-
Tags.CheckSumTag = types_1.MsgTag.CheckSum;
|
|
134
|
-
Tags.MsgTag = types_1.MsgTag.MsgType;
|
|
135
|
-
//# sourceMappingURL=tags.js.map
|
package/dist/buffer/tags.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tags.js","sourceRoot":"","sources":["../../src/buffer/tags.ts"],"names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;SAC3B;QACD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;;AApIH,oBAqIC;AApIwB,gBAAW,GAAW,cAAM,CAAC,WAAW,CAAA;AACxC,kBAAa,GAAW,cAAM,CAAC,UAAU,CAAA;AACzC,gBAAW,GAAW,cAAM,CAAC,QAAQ,CAAA;AACrC,WAAM,GAAW,cAAM,CAAC,OAAO,CAAA","sourcesContent":["import { FixDefinitions, ContainedSimpleField } from '../dictionary'\r\nimport { TagPos } from './tag-pos'\r\nimport { MsgTag } from '../types'\r\n\r\nexport enum TagType {\r\n String = 1,\r\n Int = 2,\r\n Float = 3,\r\n Boolean = 4,\r\n UtcTimestamp = 5,\r\n UtcDateOnly = 6,\r\n UtcTimeOnly = 7,\r\n LocalDate = 8,\r\n RawData = 9,\r\n Length = 10,\r\n Unknown = 11\r\n}\r\n\r\nexport class Tags {\r\n public static readonly BeginString: number = MsgTag.BeginString\r\n public static readonly BodyLengthTag: number = MsgTag.BodyLength\r\n public static readonly CheckSumTag: number = MsgTag.CheckSum\r\n public static readonly MsgTag: number = MsgTag.MsgType\r\n\r\n public tagPos: TagPos[] = new Array(this.startingLength)\r\n public nextTagPos: number = 0\r\n\r\n constructor (public readonly definitions: FixDefinitions, public readonly startingLength: number = 30 * 1000) {\r\n }\r\n\r\n public static toJSType (simple: ContainedSimpleField): string {\r\n switch (simple.definition.tagType) {\r\n case TagType.String:\r\n return 'string'\r\n\r\n case TagType.Int:\r\n case TagType.Float:\r\n case TagType.Length:\r\n return 'number'\r\n\r\n case TagType.RawData:\r\n return 'Buffer'\r\n\r\n case TagType.Boolean:\r\n return 'boolean'\r\n\r\n case TagType.UtcTimestamp:\r\n case TagType.UtcDateOnly:\r\n case TagType.UtcTimeOnly:\r\n case TagType.LocalDate:\r\n return 'Date'\r\n\r\n default:\r\n return 'string'\r\n }\r\n }\r\n\r\n public static toType (type: string): TagType {\r\n type = type || 'string'\r\n switch (type.toLowerCase()) {\r\n case 'currency':\r\n case 'string':\r\n case 'char': {\r\n return TagType.String\r\n }\r\n\r\n case 'int':\r\n case 'numingroup':\r\n case 'seqnum': {\r\n return TagType.Int\r\n }\r\n\r\n case 'qty':\r\n case 'percentage':\r\n case 'amt':\r\n case 'price':\r\n case 'priceoffset':\r\n case 'float': {\r\n return TagType.Float\r\n }\r\n\r\n case 'length': {\r\n return TagType.Length\r\n }\r\n\r\n case 'boolean': {\r\n return TagType.Boolean\r\n }\r\n\r\n case 'utctimestamp': {\r\n return TagType.UtcTimestamp\r\n }\r\n\r\n case 'localmktdate': {\r\n return TagType.LocalDate\r\n }\r\n\r\n case 'utcdateonly': {\r\n return TagType.UtcDateOnly\r\n }\r\n\r\n case 'utctimeonly': {\r\n return TagType.UtcTimeOnly\r\n }\r\n\r\n case 'data': {\r\n return TagType.RawData\r\n }\r\n\r\n default: {\r\n return TagType.String\r\n }\r\n }\r\n }\r\n\r\n public clone (): Tags {\r\n const next: number = this.nextTagPos\r\n const cloned: Tags = new Tags(this.definitions, next)\r\n cloned.nextTagPos = next\r\n for (let i = 0; i < next; ++i) {\r\n cloned.tagPos[i] = this.tagPos[i].clone()\r\n }\r\n return cloned\r\n }\r\n\r\n public reset (): void {\r\n this.nextTagPos = 0\r\n }\r\n\r\n public store (start: number, len: number, tag: number): void {\r\n const tagPtr: number = this.nextTagPos\r\n if (tagPtr === this.tagPos.length) {\r\n this.expand()\r\n }\r\n const tp: TagPos = this.tagPos[tagPtr]\r\n if (tp) {\r\n tp.assign(tagPtr, tag, start, len)\r\n } else {\r\n this.tagPos[tagPtr] = new TagPos(tagPtr, tag, start, len)\r\n }\r\n this.nextTagPos++\r\n }\r\n\r\n private expand (): void {\r\n const size = this.tagPos.length * 2\r\n const tagPos = new Array(size)\r\n for (let i = 0; i < this.tagPos.length; ++i) {\r\n tagPos[i] = this.tagPos[i]\r\n }\r\n this.tagPos = tagPos\r\n }\r\n}\r\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ContainedField, ContainedGroupField, ContainedSimpleField, ContainedComponentField } from './contained';
|
|
2
|
-
export interface IFieldDispatcher {
|
|
3
|
-
group?: {
|
|
4
|
-
(field: ContainedGroupField): void;
|
|
5
|
-
};
|
|
6
|
-
simple?: {
|
|
7
|
-
(field: ContainedSimpleField): void;
|
|
8
|
-
};
|
|
9
|
-
component?: {
|
|
10
|
-
(field: ContainedComponentField): void;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
export declare function dispatchFields(fields: ContainedField[], dispatcher: IFieldDispatcher): void;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.dispatchFields = void 0;
|
|
4
|
-
const contained_1 = require("./contained");
|
|
5
|
-
function dispatchField(field, dispatcher) {
|
|
6
|
-
switch (field.type) {
|
|
7
|
-
case contained_1.ContainedFieldType.Group: {
|
|
8
|
-
if (dispatcher.group) {
|
|
9
|
-
dispatcher.group(field);
|
|
10
|
-
}
|
|
11
|
-
break;
|
|
12
|
-
}
|
|
13
|
-
case contained_1.ContainedFieldType.Simple: {
|
|
14
|
-
if (dispatcher.simple) {
|
|
15
|
-
try {
|
|
16
|
-
dispatcher.simple(field);
|
|
17
|
-
}
|
|
18
|
-
catch (ex) {
|
|
19
|
-
let x = 0;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
break;
|
|
23
|
-
}
|
|
24
|
-
case contained_1.ContainedFieldType.Component: {
|
|
25
|
-
if (dispatcher.component) {
|
|
26
|
-
dispatcher.component(field);
|
|
27
|
-
}
|
|
28
|
-
break;
|
|
29
|
-
}
|
|
30
|
-
default:
|
|
31
|
-
throw new Error(`unknown type ${field.type}`);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
function dispatchFields(fields, dispatcher) {
|
|
35
|
-
fields.forEach((field) => {
|
|
36
|
-
dispatchField(field, dispatcher);
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
exports.dispatchFields = dispatchFields;
|
|
40
|
-
//# sourceMappingURL=fields-dispatch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fields-dispatch.js","sourceRoot":"","sources":["../../src/dictionary/fields-dispatch.ts"],"names":[],"mappings":";;;AAAA,2CAAoI;AAQpI,SAAS,aAAa,CAAE,KAAqB,EAAE,UAA4B;IACzE,QAAQ,KAAK,CAAC,IAAI,EAAE;QAClB,KAAK,8BAAkB,CAAC,KAAK,CAAC,CAAC;YAC7B,IAAI,UAAU,CAAC,KAAK,EAAE;gBACpB,UAAU,CAAC,KAAK,CAAC,KAA4B,CAAC,CAAA;aAC/C;YACD,MAAK;SACN;QAED,KAAK,8BAAkB,CAAC,MAAM,CAAC,CAAC;YAC9B,IAAI,UAAU,CAAC,MAAM,EAAE;gBACrB,IAAI;oBACF,UAAU,CAAC,MAAM,CAAC,KAA6B,CAAC,CAAA;iBACjD;gBAAC,OAAO,EAAE,EAAE;oBACX,IAAI,CAAC,GAAG,CAAC,CAAA;iBACV;aACF;YACD,MAAK;SACN;QAED,KAAK,8BAAkB,CAAC,SAAS,CAAC,CAAC;YACjC,IAAI,UAAU,CAAC,SAAS,EAAE;gBACxB,UAAU,CAAC,SAAS,CAAC,KAAgC,CAAC,CAAA;aACvD;YACD,MAAK;SACN;QAED;YACE,MAAM,IAAI,KAAK,CAAC,gBAAgB,KAAK,CAAC,IAAI,EAAE,CAAC,CAAA;KAChD;AACH,CAAC;AAED,SAAgB,cAAc,CAAE,MAAwB,EAAE,UAA4B;IACpF,MAAM,CAAC,OAAO,CAAC,CAAC,KAAqB,EAAE,EAAE;QACvC,aAAa,CAAC,KAAK,EAAE,UAAU,CAAC,CAAA;IAClC,CAAC,CAAC,CAAA;AACJ,CAAC;AAJD,wCAIC","sourcesContent":["import { ContainedField, ContainedFieldType, ContainedGroupField, ContainedSimpleField, ContainedComponentField } from './contained'\r\n\r\nexport interface IFieldDispatcher {\r\n group?: { (field: ContainedGroupField): void }\r\n simple?: { (field: ContainedSimpleField): void }\r\n component?: { (field: ContainedComponentField): void }\r\n}\r\n\r\nfunction dispatchField (field: ContainedField, dispatcher: IFieldDispatcher): void {\r\n switch (field.type) {\r\n case ContainedFieldType.Group: {\r\n if (dispatcher.group) {\r\n dispatcher.group(field as ContainedGroupField)\r\n }\r\n break\r\n }\r\n\r\n case ContainedFieldType.Simple: {\r\n if (dispatcher.simple) {\r\n try {\r\n dispatcher.simple(field as ContainedSimpleField)\r\n } catch (ex) {\r\n let x = 0\r\n }\r\n }\r\n break\r\n }\r\n\r\n case ContainedFieldType.Component: {\r\n if (dispatcher.component) {\r\n dispatcher.component(field as ContainedComponentField)\r\n }\r\n break\r\n }\r\n\r\n default:\r\n throw new Error(`unknown type ${field.type}`)\r\n }\r\n}\r\n\r\nexport function dispatchFields (fields: ContainedField[], dispatcher: IFieldDispatcher): void {\r\n fields.forEach((field: ContainedField) => {\r\n dispatchField(field, dispatcher)\r\n })\r\n}\r\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { IJsFixConfig, IJsFixLogger } from '../config';
|
|
2
|
-
export declare abstract class Launcher {
|
|
3
|
-
readonly initiatorConfig: string;
|
|
4
|
-
readonly acceptorConfig: string;
|
|
5
|
-
protected readonly logger: IJsFixLogger;
|
|
6
|
-
protected constructor(initiatorConfig: string, acceptorConfig: string);
|
|
7
|
-
protected abstract getInitiator(config: IJsFixConfig): Promise<any>;
|
|
8
|
-
protected abstract getAcceptor(config: IJsFixConfig): Promise<any>;
|
|
9
|
-
run(): Promise<any>;
|
|
10
|
-
private makeSessionFactory;
|
|
11
|
-
private setup;
|
|
12
|
-
}
|
package/dist/sample/launcher.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.Launcher = void 0;
|
|
13
|
-
const path = require("path");
|
|
14
|
-
const config_1 = require("../config");
|
|
15
|
-
const transport_1 = require("../transport");
|
|
16
|
-
const fixml_1 = require("../transport/fixml");
|
|
17
|
-
const ascii_1 = require("../transport/ascii");
|
|
18
|
-
const root = '../../';
|
|
19
|
-
const logFactory = new config_1.JsFixWinstonLogFactory(config_1.WinstonLogger.consoleOptions('info'));
|
|
20
|
-
class Launcher {
|
|
21
|
-
constructor(initiatorConfig, acceptorConfig) {
|
|
22
|
-
this.initiatorConfig = initiatorConfig;
|
|
23
|
-
this.acceptorConfig = acceptorConfig;
|
|
24
|
-
this.logger = logFactory.logger('launcher');
|
|
25
|
-
}
|
|
26
|
-
run() {
|
|
27
|
-
return new Promise((accept, reject) => {
|
|
28
|
-
const logger = this.logger;
|
|
29
|
-
logger.info('launching ..');
|
|
30
|
-
this.setup().then(() => {
|
|
31
|
-
logger.info('.. done');
|
|
32
|
-
accept(true);
|
|
33
|
-
}).catch((e) => {
|
|
34
|
-
logger.error(e);
|
|
35
|
-
reject(e);
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
makeSessionFactory(description) {
|
|
40
|
-
const fixml = description.application.protocol !== 'ascii';
|
|
41
|
-
const factory = fixml ?
|
|
42
|
-
new fixml_1.FixmlSessionMsgFactory(description) :
|
|
43
|
-
new ascii_1.AsciiSessionMsgFactory(description);
|
|
44
|
-
return factory;
|
|
45
|
-
}
|
|
46
|
-
setup() {
|
|
47
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
-
const clientDescription = require(path.join(root, this.initiatorConfig));
|
|
49
|
-
const serverDescription = require(path.join(root, this.acceptorConfig));
|
|
50
|
-
this.logger.info(`launching [protocol ${clientDescription.application.protocol}] ...`);
|
|
51
|
-
const clientConfig = yield (0, transport_1.makeConfig)(clientDescription, logFactory, this.makeSessionFactory(clientDescription));
|
|
52
|
-
const serverConfig = yield (0, transport_1.makeConfig)(serverDescription, logFactory, this.makeSessionFactory(serverDescription));
|
|
53
|
-
this.logger.info('create acceptor');
|
|
54
|
-
const server = this.getAcceptor(serverConfig);
|
|
55
|
-
this.logger.info('create initiator');
|
|
56
|
-
const client = this.getInitiator(clientConfig);
|
|
57
|
-
this.logger.info('launching ....');
|
|
58
|
-
return Promise.all([server, client]);
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
exports.Launcher = Launcher;
|
|
63
|
-
//# sourceMappingURL=launcher.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"launcher.js","sourceRoot":"","sources":["../../src/sample/launcher.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6BAA4B;AAC5B,sCAA6F;AAC7F,4CAAkF;AAClF,8CAA2D;AAC3D,8CAA2D;AAE3D,MAAM,IAAI,GAAG,QAAQ,CAAA;AACrB,MAAM,UAAU,GAAG,IAAI,+BAAsB,CAAC,sBAAa,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAA;AAEnF,MAAsB,QAAQ;IAE5B,YAAuC,eAAuB,EAAkB,cAAsB;QAA/D,oBAAe,GAAf,eAAe,CAAQ;QAAkB,mBAAc,GAAd,cAAc,CAAQ;QACpG,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,CAAA;IAC7C,CAAC;IAKM,GAAG;QACR,OAAO,IAAI,OAAO,CAAM,CAAC,MAAM,EAAE,MA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AAG,MACrB,IAAA,sBAAU,EAAC,iBAAiB,EAAE,UAAU,EAAE,IAAI,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,CAAC,CAAA;YACrF,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAA;YACnC,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,CAAA;YAC7C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAA;YACpC,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,CAAA;YAC9C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;YAClC,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;QACtC,CAAC;KAAA;CACF;AA9CD,4BA8CC","sourcesContent":["import * as path from 'path'\r\nimport { WinstonLogger, IJsFixConfig, JsFixWinstonLogFactory, IJsFixLogger } from '../config'\r\nimport { makeConfig, ISessionDescription, ISessionMsgFactory } from '../transport'\r\nimport { FixmlSessionMsgFactory } from '../transport/fixml'\r\nimport { AsciiSessionMsgFactory } from '../transport/ascii'\r\n\r\nconst root = '../../'\r\nconst logFactory = new JsFixWinstonLogFactory(WinstonLogger.consoleOptions('info'))\r\n\r\nexport abstract class Launcher {\r\n protected readonly logger: IJsFixLogger\r\n protected constructor (public readonly initiatorConfig: string, public readonly acceptorConfig: string) {\r\n this.logger = logFactory.logger('launcher')\r\n }\r\n\r\n protected abstract getInitiator (config: IJsFixConfig): Promise<any>\r\n protected abstract getAcceptor (config: IJsFixConfig): Promise<any>\r\n\r\n public run () {\r\n return new Promise<any>((accept, reject) => {\r\n const logger = this.logger\r\n logger.info('launching ..')\r\n this.setup().then(() => {\r\n logger.info('.. done')\r\n accept(true)\r\n }).catch((e: Error) => {\r\n logger.error(e)\r\n reject(e)\r\n })\r\n })\r\n }\r\n\r\n private makeSessionFactory (description: ISessionDescription): ISessionMsgFactory {\r\n const fixml = description.application.protocol !== 'ascii'\r\n const factory = fixml ?\r\n new FixmlSessionMsgFactory(description) :\r\n new AsciiSessionMsgFactory(description)\r\n return factory\r\n }\r\n\r\n private async setup () {\r\n const clientDescription: ISessionDescription = require(path.join(root, this.initiatorConfig))\r\n const serverDescription: ISessionDescription = require(path.join(root, this.acceptorConfig))\r\n this.logger.info(`launching [protocol ${clientDescription.application.protocol}] ...`)\r\n const clientConfig = await\r\n makeConfig(clientDescription, logFactory, this.makeSessionFactory(clientDescription))\r\n const serverConfig = await\r\n makeConfig(serverDescription, logFactory, this.makeSessionFactory(serverDescription))\r\n this.logger.info('create acceptor')\r\n const server = this.getAcceptor(serverConfig)\r\n this.logger.info('create initiator')\r\n const client = this.getInitiator(clientConfig)\r\n this.logger.info('launching ....')\r\n return Promise.all([server, client])\r\n }\r\n}\r\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|