@hitrading/ctp-node 1.0.0 → 1.1.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/README.md +11 -2
- package/README.zh-CN.md +9 -0
- package/dist/index.cjs +5470 -0
- package/dist/index.d.cts +9 -0
- package/package.json +14 -6
- package/prebuilds/win32-x64/@hitrading+ctp-node.node +0 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { MarketData, MarketDataEvent } from "./market-data.js";
|
|
2
|
+
export type { MdLoginReq } from "./market-data.js";
|
|
3
|
+
export { Trader, TraderEvent } from "./trader.js";
|
|
4
|
+
export type { RiskConfig, LotCap, SessionOptions, ArmSpec, ArmHandle } from "./trader.js";
|
|
5
|
+
export { CtpClient } from "./client.js";
|
|
6
|
+
export type { CallbackOptions, RspInfo } from "./client.js";
|
|
7
|
+
export * from "./generated/enums.gen.js";
|
|
8
|
+
export type * from "./generated/structs.gen.js";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hitrading/ctp-node",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "High-performance, type-safe CTP (Chinese futures) binding for Node.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ctp",
|
|
@@ -26,12 +26,19 @@
|
|
|
26
26
|
"provenance": true
|
|
27
27
|
},
|
|
28
28
|
"type": "module",
|
|
29
|
-
"main": "dist/index.
|
|
29
|
+
"main": "dist/index.cjs",
|
|
30
|
+
"module": "dist/index.js",
|
|
30
31
|
"types": "dist/index.d.ts",
|
|
31
32
|
"exports": {
|
|
32
33
|
".": {
|
|
33
|
-
"
|
|
34
|
-
|
|
34
|
+
"import": {
|
|
35
|
+
"types": "./dist/index.d.ts",
|
|
36
|
+
"default": "./dist/index.js"
|
|
37
|
+
},
|
|
38
|
+
"require": {
|
|
39
|
+
"types": "./dist/index.d.cts",
|
|
40
|
+
"default": "./dist/index.cjs"
|
|
41
|
+
}
|
|
35
42
|
}
|
|
36
43
|
},
|
|
37
44
|
"files": [
|
|
@@ -47,16 +54,17 @@
|
|
|
47
54
|
"scripts": {
|
|
48
55
|
"gen": "node scripts/codegen/generate.mjs && node scripts/codegen/generate-trader.mjs",
|
|
49
56
|
"build:native": "node-gyp rebuild",
|
|
50
|
-
"build:ts": "tsc",
|
|
57
|
+
"build:ts": "tsc && node scripts/bundle-cjs.mjs",
|
|
51
58
|
"build": "npm run gen && npm run build:native && npm run build:ts",
|
|
52
59
|
"prebuild": "prebuildify --napi --strip",
|
|
53
60
|
"install": "node-gyp-build",
|
|
54
|
-
"test": "node scripts/test-codec.mjs && node scripts/test-md.mjs && node scripts/test-trader.mjs && node scripts/test-arm.mjs && node scripts/test-risk.mjs && node scripts/test-gbk.mjs && node scripts/test-lifecycle.mjs && node scripts/test-backpressure.mjs",
|
|
61
|
+
"test": "node scripts/test-codec.mjs && node scripts/test-md.mjs && node scripts/test-trader.mjs && node scripts/test-arm.mjs && node scripts/test-risk.mjs && node scripts/test-gbk.mjs && node scripts/test-lifecycle.mjs && node scripts/test-backpressure.mjs && node scripts/smoke-cjs.cjs",
|
|
55
62
|
"bench": "node scripts/bench-decode.mjs",
|
|
56
63
|
"smoke": "node scripts/smoke.mjs"
|
|
57
64
|
},
|
|
58
65
|
"devDependencies": {
|
|
59
66
|
"@types/node": "^24.0.3",
|
|
67
|
+
"esbuild": "^0.28.1",
|
|
60
68
|
"prebuildify": "^6.0.1",
|
|
61
69
|
"typescript": "^5.8.3"
|
|
62
70
|
},
|
|
Binary file
|