| 1 | #!/bin/bash |
| 2 | # Build the hub-api first |
| 3 | cd api && npm run build |
| 4 | cd .. |
| 5 | |
| 6 | # Build the SDK |
| 7 | npx tsc |
| 8 | |
| 9 | # Create the necessary directory structure in dist |
| 10 | mkdir -p dist/api/dist |
| 11 | |
| 12 | # Copy the hub-api dist files to the SDK dist |
| 13 | cp -r api/dist/* dist/api/dist/ |
| 14 | |
| 15 | # Copy the package.json to ensure proper resolution |
| 16 | cp api/package.json dist/api/ |