@cetusprotocol/margin-sdk 0.0.5 → 0.0.6

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,21 +1,31 @@
1
1
  {
2
2
  "name": "@cetusprotocol/margin-sdk",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "SDK fon leverage",
5
5
  "typings": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
- "module": "dist/index.mjs",
7
+ "type": "module",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "browser": "./dist/index.browser.js",
12
+ "node": "./dist/index.node.js",
13
+ "import": "./dist/index.browser.js",
14
+ "default": "./dist/index.browser.js"
15
+ }
16
+ },
8
17
  "scripts": {
9
- "test": "jest",
18
+ "test": "vitest",
10
19
  "lint": "eslint src/*.ts src/**/*.ts",
11
20
  "lint:fix": "eslint src/*.ts src/**/*.ts --fix",
12
21
  "build": "pnpm run build:tsup",
13
22
  "build:tsup": "npm run build:clean && npm run _build:node",
14
23
  "build:clean": "rm -rf dist",
15
- "_build:node": "tsup --format cjs,esm --dts",
24
+ "_build:node": "tsup --format esm --dts",
16
25
  "build:doc": "npx typedoc",
17
26
  "publish_batch:test": "npm publish --tag experimental --access public",
18
- "publish:test": "node ../../scripts/version.js leverage && npm publish --tag experimental --access public"
27
+ "publish:test": "node ../../scripts/version.js leverage && npm publish --tag experimental --access public",
28
+ "postinstall": "bash ./postinstall-bluefin-sui.sh"
19
29
  },
20
30
  "repository": {
21
31
  "type": "git",
@@ -25,11 +35,11 @@
25
35
  "author": "test",
26
36
  "license": "Apache-2.0",
27
37
  "dependencies": {
28
- "@pythnetwork/pyth-sui-js": "2.2.0",
29
- "@cetusprotocol/aggregator-sdk": "1.4.3",
30
- "@suilend/sdk": "1.1.75",
31
- "@suilend/sui-fe": "0.3.29",
32
- "@sentry/nextjs": "^10.5.0"
38
+ "@suilend/sdk": "2.0.2",
39
+ "@suilend/sui-fe": "2.0.10",
40
+ "@sentry/nextjs": "^10.5.0",
41
+ "@mysten/sui": "2.6.0",
42
+ "@pythnetwork/pyth-sui-js": "2.2.0"
33
43
  },
34
44
  "devDependencies": {
35
45
  "@cetusprotocol/common-sdk": "workspace:*",
@@ -38,7 +48,11 @@
38
48
  },
39
49
  "peerDependencies": {
40
50
  "@cetusprotocol/common-sdk": "*",
41
- "@cetusprotocol/sui-clmm-sdk": "*",
42
- "@mysten/sui": "*"
51
+ "axios": "*"
52
+ },
53
+ "peerDependenciesMeta": {
54
+ "axios": {
55
+ "optional": true
56
+ }
43
57
  }
44
- }
58
+ }
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env bash
2
+ # 勿使用 set -e:find 为空时 read 会失败导致脚本中途退出、后续补丁不执行
3
+ set -uo pipefail
4
+
5
+ # 仓库根(脚本位于 packages/web/)
6
+ ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
7
+ cd "$ROOT"
8
+
9
+ PKG=node_modules/@bluefin-exchange/bluefin7k-aggregator-sdk
10
+
11
+ if [ -d "$PKG" ] && [ ! -d "$PKG/node_modules/@mysten/sui" ]; then
12
+ echo "Installing nested sui for bluefin sdk..."
13
+ (cd "$PKG" && pnpm add @mysten/sui@1.14.0)
14
+ fi
15
+
16
+