Skip to content

Commit 5617d3a

Browse files
committed
Fix CI build errors: isolated TS generation, port 3847 health check, and build configs
1 parent a9e24b1 commit 5617d3a

8 files changed

Lines changed: 33 additions & 26 deletions

File tree

.github/workflows/publish.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ jobs:
2626
- name: Generate SDKs
2727
run: npm run generate:sdk:all --workspace=pmxt-core
2828

29+
- name: Build Core
30+
run: npm run build --workspace=pmxt-core
31+
32+
- name: Start PMXT Server
33+
run: |
34+
npm run server --workspace=pmxt-core &
35+
timeout 30 bash -c 'until curl -s http://localhost:3847/health > /dev/null; do sleep 1; done'
36+
2937
- name: Run Tests (All Workspaces)
3038
run: npm test --workspaces
3139

@@ -66,7 +74,11 @@ jobs:
6674
working-directory: sdks/python
6775

6876
- name: Run tests
69-
run: pytest
77+
run: |
78+
npm run build --workspace=pmxt-core
79+
npm run server --workspace=pmxt-core &
80+
timeout 30 bash -c 'until curl -s http://localhost:3847/health > /dev/null; do sleep 1; done'
81+
pytest
7082
working-directory: sdks/python
7183

7284
- name: Build package

.github/workflows/test-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
npm run server --workspace=pmxt-core &
3535
# Wait for server to be ready
3636
echo "Waiting for server to start..."
37-
timeout 30 bash -c 'until curl -s http://localhost:3000/health > /dev/null; do sleep 1; done'
37+
timeout 30 bash -c 'until curl -s http://localhost:3847/health > /dev/null; do sleep 1; done'
3838
echo "Server is ready!"
3939
4040
- name: Test All Workspaces
@@ -74,7 +74,7 @@ jobs:
7474
npm run build --workspace=pmxt-core
7575
npm run server --workspace=pmxt-core &
7676
# Wait for server
77-
timeout 30 bash -c 'until curl -s http://localhost:3000/health > /dev/null; do sleep 1; done'
77+
timeout 30 bash -c 'until curl -s http://localhost:3847/health > /dev/null; do sleep 1; done'
7878
7979
- name: Run Tests
8080
run: pytest

core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"server": "tsx watch src/server/index.ts",
2626
"server:prod": "node dist/server/index.js",
2727
"generate:sdk:python": "npx @openapitools/openapi-generator-cli generate -i src/server/openapi.yaml -g python -o ../sdks/python/generated --package-name pmxt_internal --additional-properties=projectName=pmxt-internal,packageVersion=0.4.4,library=urllib3",
28-
"generate:sdk:typescript": "npx @openapitools/openapi-generator-cli generate -i src/server/openapi.yaml -g typescript-fetch -o ../sdks/typescript --additional-properties=npmName=pmxtjs,npmVersion=0.0.1,supportsES6=true,typescriptThreePlus=true",
28+
"generate:sdk:typescript": "npx @openapitools/openapi-generator-cli generate -i src/server/openapi.yaml -g typescript-fetch -o ../sdks/typescript/generated --additional-properties=npmName=pmxtjs,npmVersion=0.0.1,supportsES6=true,typescriptThreePlus=true",
2929
"generate:sdk:all": "npm run generate:sdk:python && npm run generate:sdk:typescript"
3030
},
3131
"keywords": [],

sdks/typescript/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
},
2222
"files": [
2323
"dist",
24-
"src",
2524
"pmxt",
25+
"generated",
2626
"index.ts",
2727
"README.md"
2828
],
@@ -48,4 +48,4 @@
4848
"ts-jest": "^29.4.6",
4949
"typescript": "^5.0.0"
5050
}
51-
}
51+
}

sdks/typescript/pmxt/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
CancelOrderRequest,
1919
FetchOpenOrdersRequest,
2020
FetchPositionsRequest,
21-
} from "../src/index.js";
21+
} from "../generated/src/index.js";
2222

2323
import {
2424
UnifiedMarket,

sdks/typescript/pmxt/server-manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Handles automatic server startup and health checks.
55
*/
66

7-
import { DefaultApi, Configuration } from "../src/index.js";
7+
import { DefaultApi, Configuration } from "../generated/src/index.js";
88

99
export interface ServerManagerOptions {
1010
baseUrl?: string;

sdks/typescript/tsconfig.esm.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
4-
"module": "esnext",
4+
"module": "NodeNext",
55
"outDir": "dist/esm"
66
}
7-
}
7+
}

sdks/typescript/tsconfig.json

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,24 @@
11
{
22
"compilerOptions": {
3+
"target": "ESNext",
4+
"module": "NodeNext",
5+
"moduleResolution": "NodeNext",
36
"declaration": true,
4-
"target": "ES2020",
5-
"module": "commonjs",
6-
"moduleResolution": "node",
7-
"outDir": "dist",
7+
"outDir": "./dist",
8+
"strict": true,
89
"esModuleInterop": true,
910
"skipLibCheck": true,
10-
"strict": false,
11-
"resolveJsonModule": true,
12-
"typeRoots": [
13-
"node_modules/@types"
14-
],
15-
"types": [
16-
"node"
17-
]
11+
"forceConsistentCasingInFileNames": true,
12+
"rootDir": "."
1813
},
1914
"include": [
20-
"src/**/*",
21-
"pmxt/**/*",
2215
"index.ts",
23-
"tests/**/*"
16+
"pmxt/**/*",
17+
"generated/src/**/*"
2418
],
2519
"exclude": [
20+
"node_modules",
2621
"dist",
27-
"node_modules"
22+
"tests"
2823
]
2924
}

0 commit comments

Comments
 (0)