Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion cortex-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
"dev": "nest dev",
"compile": "npx ncc build ./dist/src/command.js -o command",
"build": "nest build",
"build:binary": "yarn build && yarn compile && npx -q patch-package && npx @yao-pkg/pkg .",
"build:binary": "yarn build && yarn compile && npx -q patch-package && run-script-os",
"build:binary:windows": "npx @yao-pkg/pkg . --targets node20-win",
"build:binary:linux": "npx @yao-pkg/pkg . --targets node20-linux",
"build:binary:macos": "npx @yao-pkg/pkg . --targets node20-macos",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"build:extensions": "run-script-os",
"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 }\"",
Expand Down
1 change: 1 addition & 0 deletions cortex-js/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export async function start(
dataFolder?: string,
) {
if (name) {
fileManagerService.setConfigProfile(name);
const isProfileConfigExists = fileManagerService.profileConfigExists(name);
if (!isProfileConfigExists) {
await fileManagerService.writeConfigFile({
Expand Down
1 change: 0 additions & 1 deletion cortex-js/src/infrastructure/commanders/base.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Injectable } from '@nestjs/common';
import { CortexUsecases } from '@/usecases/cortex/cortex.usecases';
import ora from 'ora';
import { CortexClient } from './services/cortex.client';
import { fileManagerService } from '../services/file-manager/file-manager.service';

@Injectable()
export abstract class BaseCommand extends CommandRunner {
Expand Down