Skip to content

Commit b473f11

Browse files
committed
Added format commands to the packages and formatted the code. Added tools:publish command.
1 parent 4095b51 commit b473f11

File tree

11 files changed

+34
-12
lines changed

11 files changed

+34
-12
lines changed

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"start": "pnpm start:anthropic:streaming",
77
"start:anthropic:streaming": "pnpm build && pnpm --filter examples start:anthropic:streaming",
88
"start:openai:streaming": "pnpm build && pnpm --filter examples start:openai:streaming",
9-
"start:openai:generating": "pnpm build && pnpm --filter examples start:openai:generating"
9+
"start:openai:generating": "pnpm build && pnpm --filter examples start:openai:generating",
10+
"tools:publish": "pnpm --filter @suiware/ai-tools publish"
1011
},
1112
"license": "Apache-2.0",
1213
"workspaces": [
File renamed without changes.

packages/examples/package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"scripts": {
55
"start:anthropic:streaming": "tsx src/anthropic-streaming.ts",
66
"start:openai:streaming": "tsx src/openai-streaming.ts",
7-
"start:openai:generating": "tsx src/openai-generating.ts"
7+
"start:openai:generating": "tsx src/openai-generating.ts",
8+
"format": "prettier --write './src/**/*.{js,ts}'"
89
},
910
"devDependencies": {
1011
"@types/node": "^22.13.1",
@@ -21,6 +22,7 @@
2122
"bignumber.js": "^9.1.2",
2223
"dotenv": "^16.4.7",
2324
"navi-sdk": "^1.4.27",
24-
"zod": "^3.24.1"
25+
"zod": "^3.24.1",
26+
"prettier": "^3.4.2"
2527
}
2628
}

packages/examples/src/anthropic-streaming.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
InvalidToolArgumentsError,
1111
NoSuchToolError,
1212
streamText,
13-
ToolExecutionError
13+
ToolExecutionError,
1414
} from 'ai'
1515
import { configDotenv } from 'dotenv'
1616
import * as readline from 'node:readline/promises'

packages/tools/.prettierrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"trailingComma": "es5",
3+
"tabWidth": 2,
4+
"useTabs": false,
5+
"semi": false,
6+
"singleQuote": true
7+
}

packages/tools/package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,16 @@
6262
],
6363
"scripts": {
6464
"build": "tsup",
65-
"dev": "tsup --watch"
65+
"dev": "tsup --watch",
66+
"format": "prettier --write './src/**/*.{js,ts}'"
6667
},
6768
"license": "Apache-2.0",
6869
"description": "",
6970
"devDependencies": {
7071
"@types/node": "^22.13.1",
7172
"tsup": "^8.3.6",
72-
"typescript": "^5.7.3"
73+
"typescript": "^5.7.3",
74+
"prettier": "^3.4.2"
7375
},
7476
"dependencies": {
7577
"@mysten/sui": "^1.21.2",
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export function getSetting(name: string): string | null {
2-
return process.env?.[name] || null;
2+
return process.env?.[name] || null
33
}

packages/tools/src/core/utils/utils.ts

-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,3 @@ export function disableConsoleLog() {
1616
export function enableConsoleLog(originalConsoleLog: any) {
1717
console.log = originalConsoleLog
1818
}
19-

packages/tools/src/sui/services/SuiService.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,7 @@ export class SuiService {
142142
for (const KeypairClass of keypairClasses) {
143143
try {
144144
return KeypairClass.fromSecretKey(privateKey)
145-
} catch {
146-
147-
}
145+
} catch {}
148146
}
149147
throw new Error('Failed to initialize keypair from secret key')
150148
}
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export type TSuiNetwork = "mainnet" | "testnet" | "devnet" | "localnet";
1+
export type TSuiNetwork = 'mainnet' | 'testnet' | 'devnet' | 'localnet'

pnpm-lock.yaml

+13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)