Skip to content

Commit 5d887fd

Browse files
authored
v0.4.10: ts-sdk updates, db updates
2 parents 25f5e31 + 1a0fdb3 commit 5d887fd

File tree

8 files changed

+16
-31
lines changed

8 files changed

+16
-31
lines changed

.github/workflows/publish-python-sdk.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,6 @@ jobs:
8484
```
8585
8686
### Documentation
87-
See the [README](https://github.com/simstudio/sim/tree/main/packages/python-sdk) for usage instructions.
87+
See the [README](https://github.com/simstudioai/sim/tree/main/packages/python-sdk) or the [docs](https://docs.sim.ai/sdks/python) for more information.
8888
draft: false
8989
prerelease: false

.github/workflows/publish-ts-sdk.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ jobs:
2525
registry-url: 'https://registry.npmjs.org/'
2626

2727
- name: Install dependencies
28-
working-directory: packages/ts-sdk
2928
run: bun install
3029

3130
- name: Run tests
@@ -80,6 +79,6 @@ jobs:
8079
```
8180
8281
### Documentation
83-
See the [README](https://github.com/simstudio/sim/tree/main/packages/ts-sdk) for usage instructions.
82+
See the [README](https://github.com/simstudioai/sim/tree/main/packages/ts-sdk) or the [docs](https://docs.sim.ai/sdks/typescript) for more information.
8483
draft: false
8584
prerelease: false

apps/sim/socket-server/database/operations.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ const connectionString = env.DATABASE_URL
1313
const socketDb = drizzle(
1414
postgres(connectionString, {
1515
prepare: false,
16-
idle_timeout: 10,
17-
connect_timeout: 20,
18-
max: 15,
16+
idle_timeout: 20,
17+
connect_timeout: 10,
18+
max: 5,
1919
onnotice: () => {},
2020
}),
2121
{ schema }
2222
)
2323

24-
// Use dedicated connection for socket operations, fallback to shared db for compatibility
24+
// Use dedicated connection for socket operations
2525
const db = socketDb
2626

2727
// Constants

apps/sim/socket-server/rooms/manager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ const connectionString = env.DATABASE_URL
1111
const db = drizzle(
1212
postgres(connectionString, {
1313
prepare: false,
14-
idle_timeout: 15,
15-
connect_timeout: 20,
14+
idle_timeout: 20,
15+
connect_timeout: 10,
1616
max: 3,
1717
onnotice: () => {},
1818
}),

packages/db/index.ts

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,11 @@ if (!connectionString) {
1010
throw new Error('Missing DATABASE_URL environment variable')
1111
}
1212

13-
console.log(
14-
'[DB Pool Init]',
15-
JSON.stringify({
16-
timestamp: new Date().toISOString(),
17-
nodeEnv: process.env.NODE_ENV,
18-
action: 'CREATING_CONNECTION_POOL',
19-
poolConfig: {
20-
max: 30,
21-
idle_timeout: 20,
22-
connect_timeout: 30,
23-
prepare: false,
24-
},
25-
pid: process.pid,
26-
isProduction: process.env.NODE_ENV === 'production',
27-
})
28-
)
29-
3013
const postgresClient = postgres(connectionString, {
3114
prepare: false,
3215
idle_timeout: 20,
33-
connect_timeout: 30,
34-
max: 30,
16+
connect_timeout: 10,
17+
max: 20,
3518
onnotice: () => {},
3619
})
3720

packages/ts-sdk/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
"name": "simstudio-ts-sdk",
33
"version": "0.1.0",
44
"description": "Sim SDK - Execute workflows programmatically",
5+
"type": "module",
56
"main": "dist/index.js",
67
"module": "dist/index.js",
78
"types": "dist/index.d.ts",
89
"exports": {
910
".": {
1011
"types": "./dist/index.d.ts",
11-
"import": "./dist/index.js",
12-
"require": "./dist/index.js"
12+
"import": "./dist/index.js"
1313
}
1414
},
1515
"scripts": {

packages/ts-sdk/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
33
"target": "ES2020",
4-
"module": "commonjs",
4+
"module": "ES2020",
55
"lib": ["ES2020"],
66
"outDir": "./dist",
77
"rootDir": "./src",

packages/ts-sdk/vitest.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,7 @@ export default defineConfig({
88
include: ['src/**/*.test.{ts,tsx}', 'tests/**/*.test.{ts,tsx}'],
99
exclude: ['**/node_modules/**', '**/dist/**'],
1010
},
11+
resolve: {
12+
conditions: ['node', 'default'],
13+
},
1114
})

0 commit comments

Comments
 (0)