@yuants/app-virtual-exchange 0.10.2 → 0.11.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/dist/quote/__tests__/implementations.test.js +66 -0
- package/dist/quote/__tests__/implementations.test.js.map +1 -1
- package/dist/quote/implementations/v0.js +12 -1
- package/dist/quote/implementations/v0.js.map +1 -1
- package/dist/quote/implementations/v1.js +12 -1
- package/dist/quote/implementations/v1.js.map +1 -1
- package/dist/quote/implementations/v2.js +12 -1
- package/dist/quote/implementations/v2.js.map +1 -1
- package/dist/quote/implementations/v3.js +12 -1
- package/dist/quote/implementations/v3.js.map +1 -1
- package/dist/quote/service.js +6 -29
- package/dist/quote/service.js.map +1 -1
- package/dist/quote/types.js.map +1 -1
- package/lib/quote/__tests__/implementations.test.js +66 -0
- package/lib/quote/__tests__/implementations.test.js.map +1 -1
- package/lib/quote/implementations/v0.d.ts.map +1 -1
- package/lib/quote/implementations/v0.js +12 -1
- package/lib/quote/implementations/v0.js.map +1 -1
- package/lib/quote/implementations/v1.d.ts.map +1 -1
- package/lib/quote/implementations/v1.js +12 -1
- package/lib/quote/implementations/v1.js.map +1 -1
- package/lib/quote/implementations/v2.d.ts.map +1 -1
- package/lib/quote/implementations/v2.js +12 -1
- package/lib/quote/implementations/v2.js.map +1 -1
- package/lib/quote/implementations/v3.d.ts.map +1 -1
- package/lib/quote/implementations/v3.js +12 -1
- package/lib/quote/implementations/v3.js.map +1 -1
- package/lib/quote/service.js +5 -28
- package/lib/quote/service.js.map +1 -1
- package/lib/quote/types.d.ts +8 -0
- package/lib/quote/types.d.ts.map +1 -1
- package/lib/quote/types.js.map +1 -1
- package/package.json +3 -3
- package/temp/package-deps.json +12 -12
package/lib/quote/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/quote/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,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M,WAAW,WAAW;IAC1B,MAAM,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC7C,YAAY,EAAE,MAAM,kBAAkB,CAAC;IACvC,aAAa,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IACtF,MAAM,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,UAAU,EAAE,MAAM,KAAK,kBAAkB,CAAC;IAC/F;;;;;;OAMG;IACH,YAAY,EAAE,CAAC,CAAC,SAAS,SAAS,EAChC,WAAW,EAAE,MAAM,EAAE,EACrB,MAAM,EAAE,CAAC,EAAE,KACR,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,qBAAqB,CAAC;IAC5B,uBAAuB,EAAE,GAAG,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;CAC9D;AAED,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,SAAS,CAAC;CAClB"}
|
package/lib/quote/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/quote/types.ts"],"names":[],"mappings":"","sourcesContent":["import { IQuote } from '@yuants/data-quote';\nimport { IQuoteServiceMetadata } from '@yuants/exchange';\n\nexport type IQuoteKey = Exclude<keyof IQuote, 'datasource_id' | 'product_id' | 'updated_at'>;\n\n/**\n * 用于批量更新的数据结构\n * 结构为:\n * product_id -> field_name (keyof IQuote) -> [value: string, updated_at: number]\n * 这样设计的目的是为了减少更新的数据量,同时保留每个字段的更新时间\n *\n * 例如:\n * ```json\n * {\n * \"product_123\": {\n * \"last_price\": [\"100.5\", 1627890123456],\n * \"volume\": [\"1500\", 1627890123456]\n * },\n * \"product_456\": {\n * \"last_price\": [\"200.0\", 1627890123456]\n * }\n * }\n * ```\n * @public\n */\nexport type IQuoteUpdateAction = Record<\n string,\n Partial<Record<IQuoteKey, [value: string, updated_at: number]>>\n>;\nexport interface IQuoteState {\n update: (action: IQuoteUpdateAction) => void;\n dumpAsObject: () => IQuoteUpdateAction;\n getValueTuple: (product_id: string, field: IQuoteKey) => [string, number] | undefined;\n filter: (product_ids: string[], fields: IQuoteKey[], updated_at: number) => IQuoteUpdateAction;\n}\n\nexport interface IQuoteProviderInstance {\n terminal_id: string;\n service_id: string;\n}\n\n/**\n * A \"provider group\" is a capability signature of `GetQuotes`.\n * Multiple vendor terminals may provide the same capability; VEX load-balances across instances.\n */\nexport interface IQuoteProviderGroup {\n group_id: string;\n meta: IQuoteServiceMetadata;\n mapTerminalIdToInstance: Map<string, IQuoteProviderInstance>;\n}\n\nexport interface IQuoteRequire {\n product_id: string;\n field: IQuoteKey;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/quote/types.ts"],"names":[],"mappings":"","sourcesContent":["import { IQuote } from '@yuants/data-quote';\nimport { IQuoteServiceMetadata } from '@yuants/exchange';\n\nexport type IQuoteKey = Exclude<keyof IQuote, 'datasource_id' | 'product_id' | 'updated_at'>;\n\n/**\n * 用于批量更新的数据结构\n * 结构为:\n * product_id -> field_name (keyof IQuote) -> [value: string, updated_at: number]\n * 这样设计的目的是为了减少更新的数据量,同时保留每个字段的更新时间\n *\n * 例如:\n * ```json\n * {\n * \"product_123\": {\n * \"last_price\": [\"100.5\", 1627890123456],\n * \"volume\": [\"1500\", 1627890123456]\n * },\n * \"product_456\": {\n * \"last_price\": [\"200.0\", 1627890123456]\n * }\n * }\n * ```\n * @public\n */\nexport type IQuoteUpdateAction = Record<\n string,\n Partial<Record<IQuoteKey, [value: string, updated_at: number]>>\n>;\nexport interface IQuoteState {\n update: (action: IQuoteUpdateAction) => void;\n dumpAsObject: () => IQuoteUpdateAction;\n getValueTuple: (product_id: string, field: IQuoteKey) => [string, number] | undefined;\n filter: (product_ids: string[], fields: IQuoteKey[], updated_at: number) => IQuoteUpdateAction;\n /**\n * 过滤并获取指定产品和字段的值,即便对应字段不存在或未更新也会返回空字符串\n *\n * @param product_ids\n * @param fields\n * @returns\n */\n filterValues: <K extends IQuoteKey>(\n product_ids: string[],\n fields: K[],\n ) => Record<string, Record<K, string>>;\n}\n\nexport interface IQuoteProviderInstance {\n terminal_id: string;\n service_id: string;\n}\n\n/**\n * A \"provider group\" is a capability signature of `GetQuotes`.\n * Multiple vendor terminals may provide the same capability; VEX load-balances across instances.\n */\nexport interface IQuoteProviderGroup {\n group_id: string;\n meta: IQuoteServiceMetadata;\n mapTerminalIdToInstance: Map<string, IQuoteProviderInstance>;\n}\n\nexport interface IQuoteRequire {\n product_id: string;\n field: IQuoteKey;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yuants/app-virtual-exchange",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"@yuants/data-product": "0.5.1",
|
|
14
14
|
"@yuants/data-account": "0.11.0",
|
|
15
15
|
"@yuants/data-order": "0.7.1",
|
|
16
|
-
"@yuants/data-quote": "0.
|
|
16
|
+
"@yuants/data-quote": "0.4.0",
|
|
17
17
|
"@yuants/secret": "0.4.1",
|
|
18
18
|
"@yuants/sql": "0.9.31",
|
|
19
|
-
"@yuants/exchange": "0.7.
|
|
19
|
+
"@yuants/exchange": "0.7.1",
|
|
20
20
|
"@yuants/cache": "0.3.4",
|
|
21
21
|
"rxjs": "~7.5.6",
|
|
22
22
|
"ajv": "~8.12.0"
|
package/temp/package-deps.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"apps/virtual-exchange/CHANGELOG.json": "
|
|
3
|
-
"apps/virtual-exchange/CHANGELOG.md": "
|
|
2
|
+
"apps/virtual-exchange/CHANGELOG.json": "238ca5946525c997bca0e6244d308e399497371d",
|
|
3
|
+
"apps/virtual-exchange/CHANGELOG.md": "5fc1405876f8f83fea3e0d7dc87287e601f1ffd6",
|
|
4
4
|
"apps/virtual-exchange/api-extractor.json": "62f4fd324425b9a235f0c117975967aab09ced0c",
|
|
5
5
|
"apps/virtual-exchange/config/jest.config.json": "4bb17bde3ee911163a3edb36a6eb71491d80b1bd",
|
|
6
6
|
"apps/virtual-exchange/config/rig.json": "f6c7b5537dc77a3170ba9f008bae3b6c3ee11956",
|
|
7
7
|
"apps/virtual-exchange/config/typescript.json": "854907e8a821f2050f6533368db160c649c25348",
|
|
8
8
|
"apps/virtual-exchange/etc/app-virtual-exchange.api.md": "6cb40ec1fa2d40a31a7b0dd3f02b8b24a4d7c4de",
|
|
9
|
-
"apps/virtual-exchange/package.json": "
|
|
9
|
+
"apps/virtual-exchange/package.json": "c51463d9dd837dff2cd6b5c7a1d142bf39000616",
|
|
10
10
|
"apps/virtual-exchange/src/credential.ts": "7ff9cfe06e46005b2a69e60b5596eb1f59d42bba",
|
|
11
11
|
"apps/virtual-exchange/src/general.ts": "b3d0cd8c57975b9711008beaa05ad7f6812bd57e",
|
|
12
12
|
"apps/virtual-exchange/src/index.ts": "67e1963facf0ee2aedd871496361cff90bf49356",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"apps/virtual-exchange/src/product-collector.ts": "15ba0a692d694d20b607eaad0287a864577ef30c",
|
|
16
16
|
"apps/virtual-exchange/src/quote/DESIGN.md": "4b952e24f77a7429fd82cdf29155a725bbebe583",
|
|
17
17
|
"apps/virtual-exchange/src/quote/QUOTE_STATE_PERFORMANCE_REPORT.md": "b90b7b77a70bb5f4b503d03ccba8f1d07edf7d37",
|
|
18
|
-
"apps/virtual-exchange/src/quote/__tests__/implementations.test.ts": "
|
|
18
|
+
"apps/virtual-exchange/src/quote/__tests__/implementations.test.ts": "2ab7a385eaffe344d5ebfc87689399c096831b54",
|
|
19
19
|
"apps/virtual-exchange/src/quote/benchmark/ForkedQuoteStateComparisonTest.ts": "de83e52651e4ca3a330719e805298af3f195c696",
|
|
20
20
|
"apps/virtual-exchange/src/quote/benchmark/PerformanceTester.ts": "5de2f97bf856804bb98309939dab273334b373cc",
|
|
21
21
|
"apps/virtual-exchange/src/quote/benchmark/QuoteStateComparisonTest.ts": "1d9c11444333d6a27898d6c1209b1b84d37a9bab",
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
"apps/virtual-exchange/src/quote/benchmark/worker.ts": "936e4332139e15d1278fcefaf0bb0c5fb66a38d2",
|
|
26
26
|
"apps/virtual-exchange/src/quote/implementations/README.md": "da3afe60c9bc16576cc226d63c233bb2d2fd7c38",
|
|
27
27
|
"apps/virtual-exchange/src/quote/implementations/index.ts": "99d8c99b24e5e7f14293f489916c83a0bac192d7",
|
|
28
|
-
"apps/virtual-exchange/src/quote/implementations/v0.ts": "
|
|
29
|
-
"apps/virtual-exchange/src/quote/implementations/v1.ts": "
|
|
30
|
-
"apps/virtual-exchange/src/quote/implementations/v2.ts": "
|
|
31
|
-
"apps/virtual-exchange/src/quote/implementations/v3.ts": "
|
|
32
|
-
"apps/virtual-exchange/src/quote/service.ts": "
|
|
28
|
+
"apps/virtual-exchange/src/quote/implementations/v0.ts": "cbc6aa7b7356b18d83a219241e9070e2aeed1365",
|
|
29
|
+
"apps/virtual-exchange/src/quote/implementations/v1.ts": "f8c5bd941659c4a8b6dff0541f44133f123fc78a",
|
|
30
|
+
"apps/virtual-exchange/src/quote/implementations/v2.ts": "8723cede6cee6092ec0b8ce9b273ee92f47790cf",
|
|
31
|
+
"apps/virtual-exchange/src/quote/implementations/v3.ts": "f5e4f31c5592d84206d0a27ee51107ba9a91a53d",
|
|
32
|
+
"apps/virtual-exchange/src/quote/service.ts": "f74bb5f0fb776839d84e55709f3971301b3fdeb3",
|
|
33
33
|
"apps/virtual-exchange/src/quote/state.benchmark.ts": "075d3c5bab0ae6f7b61accfe977f7d35233b06ad",
|
|
34
34
|
"apps/virtual-exchange/src/quote/state.ts": "a13be6e84d30b54de16f90e1cb3feeeab75957df",
|
|
35
|
-
"apps/virtual-exchange/src/quote/types.ts": "
|
|
35
|
+
"apps/virtual-exchange/src/quote/types.ts": "4894fd3df8b5bb92e7aaacda9136fa3e70d45835",
|
|
36
36
|
"apps/virtual-exchange/src/quote/upstream/executor.ts": "f7acd3ced6114f1a20ad72c746a9dfbf67b495ec",
|
|
37
37
|
"apps/virtual-exchange/src/quote/upstream/index.ts": "10439c0fa997c61fcca1763aae40fddba3daa3da",
|
|
38
38
|
"apps/virtual-exchange/src/quote/upstream/prefix-matcher.ts": "079066de8c1d5d91b63ffc2bf67c2163e7b8a540",
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"libraries/data-product/temp/package-deps.json": "899bba8ace3f04b2035488ff9059e40732ef1d97",
|
|
46
46
|
"libraries/data-account/temp/package-deps.json": "d49586cd2fc2d6d025e585e5a5dd04d37c41263c",
|
|
47
47
|
"libraries/data-order/temp/package-deps.json": "8aa3e27ff80629d417bfe920e85d8525fbb52f42",
|
|
48
|
-
"libraries/data-quote/temp/package-deps.json": "
|
|
48
|
+
"libraries/data-quote/temp/package-deps.json": "c2f009f818a503342bef588da21c9abd52beea00",
|
|
49
49
|
"libraries/secret/temp/package-deps.json": "360293dbcad7870a579c7c043d7f8f87a1b68c48",
|
|
50
50
|
"libraries/sql/temp/package-deps.json": "041074e0102f9a01820c0fddcf82b9eaee226c79",
|
|
51
|
-
"libraries/exchange/temp/package-deps.json": "
|
|
51
|
+
"libraries/exchange/temp/package-deps.json": "8e1be9c0b37755b28288f53265acf9e27f99c943",
|
|
52
52
|
"libraries/cache/temp/package-deps.json": "e1f94620bc6245add32a4f9d379ed2901129d818",
|
|
53
53
|
"tools/toolkit/temp/package-deps.json": "23e053490eb8feade23e4d45de4e54883e322711"
|
|
54
54
|
}
|