@okx_ai/okx-trade-cli 1.2.0 → 1.2.1

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/index.js CHANGED
@@ -8241,7 +8241,7 @@ async function cmdDcaSubOrders(run, opts) {
8241
8241
  // src/index.ts
8242
8242
  var _require = createRequire(import.meta.url);
8243
8243
  var CLI_VERSION = _require("../package.json").version;
8244
- var GIT_HASH = true ? "63e2e31" : "dev";
8244
+ var GIT_HASH = true ? "c2ddd04" : "dev";
8245
8245
  function handleConfigCommand(action, rest, json, lang, force) {
8246
8246
  if (action === "init") return cmdConfigInit(lang === "zh" ? "zh" : "en");
8247
8247
  if (action === "show") return cmdConfigShow(json);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@okx_ai/okx-trade-cli",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "OKX CLI - Command line tool for OKX exchange",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -10,6 +10,7 @@
10
10
  },
11
11
  "files": [
12
12
  "dist",
13
+ "scripts",
13
14
  "README.md"
14
15
  ],
15
16
  "publishConfig": {
@@ -38,6 +39,7 @@
38
39
  "build": "tsup",
39
40
  "typecheck": "tsc --noEmit",
40
41
  "clean": "rm -rf dist",
42
+ "postinstall": "node scripts/postinstall.js",
41
43
  "test:unit": "node --import tsx/esm --test test/*.test.ts",
42
44
  "test:coverage": "c8 --reporter=lcov --reporter=text --src=src node --import tsx/esm --test test/*.test.ts"
43
45
  }
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { readFileSync } from 'node:fs';
4
+ import { fileURLToPath } from 'node:url';
5
+ import { dirname, join } from 'node:path';
6
+
7
+ const __dirname = dirname(fileURLToPath(import.meta.url));
8
+ const { name, version } = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf8'));
9
+
10
+ process.stderr.write('\n');
11
+ process.stderr.write(` ${name} v${version}\n`);
12
+ 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');
13
+ process.stderr.write(' ⚠️ 安全提示:切勿在Agent对话中发送API Key。请创建Agent专用子账户接入。先在模拟盘充分测试,再接入实盘。\n');
14
+ process.stderr.write('\n');