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

Commit fcbf842

Browse files
authored
fix: set namespace for js module (#999)
1 parent b725a6c commit fcbf842

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

cortex-js/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
"dev": "nest dev",
1515
"compile": "npx ncc build ./dist/src/command.js -o command",
1616
"build": "nest build",
17-
"build:binary": "yarn build && yarn compile && npx -q patch-package && npx @yao-pkg/pkg .",
17+
"build:binary": "yarn build && yarn compile && npx -q patch-package && run-script-os",
18+
"build:binary:windows": "npx @yao-pkg/pkg . --targets node20-win",
19+
"build:binary:linux": "npx @yao-pkg/pkg . --targets node20-linux",
20+
"build:binary:macos": "npx @yao-pkg/pkg . --targets node20-macos",
1821
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
1922
"build:extensions": "run-script-os",
2023
"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/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export async function start(
2323
dataFolder?: string,
2424
) {
2525
if (name) {
26+
fileManagerService.setConfigProfile(name);
2627
const isProfileConfigExists = fileManagerService.profileConfigExists(name);
2728
if (!isProfileConfigExists) {
2829
await fileManagerService.writeConfigFile({

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { Injectable } from '@nestjs/common';
33
import { CortexUsecases } from '@/usecases/cortex/cortex.usecases';
44
import ora from 'ora';
55
import { CortexClient } from './services/cortex.client';
6-
import { fileManagerService } from '../services/file-manager/file-manager.service';
76

87
@Injectable()
98
export abstract class BaseCommand extends CommandRunner {

0 commit comments

Comments
 (0)