Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 878830e

Browse files
authored
fix: bun - cortex serve does not work (#751)
1 parent f5e6b2f commit 878830e

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

cortex-js/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
"dev": "nest dev",
1313
"build": "nest build && cpx \"cpuinfo/bin/**\" dist/bin",
1414
"build:binary": "run-script-os && cpx \"cpuinfo/bin/**\" dist/bin",
15-
"build:binary:windows": "bun build --compile --target=bun-windows-x64 ./src/command.ts --outfile cortex.exe --external @nestjs/microservices --external @nestjs/websockets/socket-module --external class-transformer/storage",
16-
"build:binary:linux": "bun build --compile --target=bun-linux-x64 ./src/command.ts --outfile cortex --external @nestjs/microservices --external @nestjs/websockets/socket-module --external class-transformer/storage",
17-
"build:binary:macos": "bun build --compile --target=bun-darwin-arm64 ./src/command.ts --outfile cortex --external @nestjs/microservices --external @nestjs/websockets/socket-module --external class-transformer/storage",
15+
"build:binary:windows": "bun build --compile --target=bun-windows-x64 ./src/command.js --outfile cortex.exe --external @nestjs/microservices --external @nestjs/websockets/socket-module --external class-transformer/storage",
16+
"build:binary:linux": "bun build --compile --target=bun-linux-x64 ./src/command.js --outfile cortex --external @nestjs/microservices --external @nestjs/websockets/socket-module --external class-transformer/storage",
17+
"build:binary:macos": "bun build --compile --target=bun-darwin-arm64 ./src/command.js --outfile cortex --external @nestjs/microservices --external @nestjs/websockets/socket-module --external class-transformer/storage",
1818
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
1919
"build:extensions": "run-script-os",
2020
"build:extensions:windows": "powershell -command \"$jobs = Get-ChildItem -Path './src/extensions' -Directory | ForEach-Object { Start-Job -Name ($_.Name) -ScriptBlock { param($_dir); try { Set-Location $_dir; yarn; yarn build; Write-Output 'Build successful in ' + $_dir } catch { Write-Error 'Error in ' + $_dir; throw } } -ArgumentList $_.FullName }; $jobs | Wait-Job; $jobs | ForEach-Object { Receive-Job -Job $_ -Keep } | ForEach-Object { Write-Host $_ }; $failed = $jobs | Where-Object { $_.State -ne 'Completed' -or $_.ChildJobs[0].JobStateInfo.State -ne 'Completed' }; if ($failed) { Exit 1 }\"",

cortex-js/src/infrastructure/commanders/serve.command.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ export class ServeCommand extends CommandRunner {
4040
) {
4141
const serveProcess = spawn(
4242
'node',
43-
process.env.TEST
44-
? [join(__dirname, '../../../dist/src/main.js')]
45-
: [join(__dirname, '../../main.js')],
43+
[join(__dirname, '../../../dist/src/main.js')],
4644
{
4745
env: {
4846
...process.env,

cortex-js/src/infrastructure/dtos/threads/create-thread-assistant.dto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { IsArray, IsNumber, IsOptional, IsString } from 'class-validator';
22
import { ApiProperty } from '@nestjs/swagger';
3-
import {
3+
import type {
44
Assistant,
55
AssistantResponseFormatOption,
66
AssistantToolResources,

0 commit comments

Comments
 (0)