@okx_ai/okx-trade-cli 1.2.3-beta.1 → 1.2.4-beta.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@okx_ai/okx-trade-cli",
3
- "version": "1.2.3-beta.1",
3
+ "version": "1.2.4-beta.0",
4
4
  "description": "OKX CLI - Command line tool for OKX exchange",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -8,26 +8,39 @@
8
8
  "bin": {
9
9
  "okx": "dist/index.js"
10
10
  },
11
- "files": ["dist", "README.md"],
12
- "publishConfig": { "access": "public" },
13
- "scripts": {
14
- "build": "tsup",
15
- "typecheck": "tsc --noEmit",
16
- "clean": "rm -rf dist",
17
- "test:unit": "node --import tsx/esm --test test/*.test.ts",
18
- "test:coverage": "c8 --reporter=lcov --reporter=text --src=src node --import tsx/esm --test test/*.test.ts"
11
+ "files": [
12
+ "dist",
13
+ "scripts",
14
+ "README.md"
15
+ ],
16
+ "publishConfig": {
17
+ "access": "public"
18
+ },
19
+ "engines": {
20
+ "node": ">=18"
19
21
  },
20
- "engines": { "node": ">=18" },
21
- "keywords": ["okx", "cli", "trading"],
22
+ "keywords": [
23
+ "okx",
24
+ "cli",
25
+ "trading"
26
+ ],
22
27
  "dependencies": {
23
- "smol-toml": "^1.3.4"
28
+ "undici": "^6.0.0"
24
29
  },
25
30
  "devDependencies": {
26
- "@agent-tradekit/core": "workspace:*",
27
31
  "@types/node": "^25.2.2",
28
32
  "c8": "^10.1.3",
29
33
  "tsup": "^8.5.1",
30
34
  "tsx": "^4.19.3",
31
- "typescript": "^5.9.3"
35
+ "typescript": "^5.9.3",
36
+ "@agent-tradekit/core": "1.0.0"
37
+ },
38
+ "scripts": {
39
+ "build": "tsup && node -e \"const fs=require('fs');fs.mkdirSync('scripts',{recursive:true});fs.copyFileSync('../../scripts/postinstall-notice.js','scripts/postinstall.js')\"",
40
+ "typecheck": "tsc --noEmit",
41
+ "clean": "rm -rf dist scripts",
42
+ "postinstall": "node scripts/postinstall.js || exit 0",
43
+ "test:unit": "node --import tsx/esm --test test/*.test.ts",
44
+ "test:coverage": "c8 --reporter=lcov --reporter=text --src=src node --import tsx/esm --test test/*.test.ts"
32
45
  }
33
- }
46
+ }
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+ // Shared postinstall notice script — do not edit the copies in packages/*/scripts/
3
+ // This file is the single source of truth; copies are generated during build.
4
+
5
+ import { readFileSync } from 'node:fs';
6
+ import { fileURLToPath } from 'node:url';
7
+ import { dirname, join } from 'node:path';
8
+
9
+ try {
10
+ const __dirname = dirname(fileURLToPath(import.meta.url));
11
+ const { name, version } = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf8'));
12
+
13
+ process.stderr.write('\n');
14
+ process.stderr.write(` ${name} v${version}\n`);
15
+ process.stderr.write(' ⚠️ Security Tips: NEVER send API keys in agent chat. Create a dedicated sub-account for your agent. Test on demo before going live.\n');
16
+ process.stderr.write(' ⚠️ 安全提示:切勿在Agent对话中发送API Key。请创建Agent专用子账户接入。先在模拟盘充分测试,再接入实盘。\n');
17
+ process.stderr.write('\n');
18
+ } catch {
19
+ // Silently ignore errors to avoid blocking installation
20
+ }