fixed build libs

This commit is contained in:
Boki 2025-06-18 21:33:22 -04:00
parent 2db7c0dc36
commit 3d8456c63c

View file

@ -37,22 +37,22 @@ libs=(
"logger" # Logging utilities - depends on types
"utils" # Utilities - depends on types and config
# # Database clients
# "postgres-client" # PostgreSQL client - depends on types, config, logger
# "mongodb-client" # MongoDB client - depends on types, config, logger
# "questdb-client" # QuestDB client - depends on types, config, logger
# Database clients
"postgres-client" # PostgreSQL client - depends on types, config, logger
"mongodb-client" # MongoDB client - depends on types, config, logger
"questdb-client" # QuestDB client - depends on types, config, logger
# # Service libraries
# "cache" # Cache - depends on types and logger
# "http" # HTTP client - depends on types, config, logger
# "event-bus" # Event bus - depends on types, logger
# # "queue" # Queue - depends on types, logger, cache
# "shutdown" # Shutdown - depends on types, logger
# Service libraries
"cache" # Cache - depends on types and logger
"http" # HTTP client - depends on types, config, logger
"event-bus" # Event bus - depends on types, logger
"queue" # Queue - depends on types, logger, cache
"shutdown" # Shutdown - depends on types, logger
# # Engine libraries
# "data-frame" # Data frame - depends on types, utils
# "vector-engine" # Vector engine - depends on types, utils, data-frame
# "strategy-engine" # Strategy engine - depends on types, utils, event-bus
# Engine libraries
"data-frame" # Data frame - depends on types, utils
"vector-engine" # Vector engine - depends on types, utils, data-frame
"strategy-engine" # Strategy engine - depends on types, utils, event-bus
)
# Build each library in order
@ -61,14 +61,25 @@ for lib in "${libs[@]}"; do
echo -e "${GREEN}Building $lib...${NC}"
cd "$lib_path"
# print the current working directory
# Clean previous build artifacts
rm -rf dist tsconfig.tsbuildinfo
bun run build
# Use npx tsc directly instead of bun run build
npx tsc
if [ $? -ne 0 ]; then
echo -e "${RED}Failed to build $lib. Exiting.${NC}"
exit 1
fi
# Verify build was successful
if [ -d "dist" ]; then
echo -e "${GREEN}✓ Built successfully${NC}"
else
echo -e "${RED}✗ Build did not create dist directory${NC}"
exit 1
fi
done
echo -e "${GREEN}All libraries built successfully!${NC}"