Skip to content

Commit

Permalink
fix: set namespace for js module (#999)
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-jan authored Aug 8, 2024
1 parent b725a6c commit fcbf842
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
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

0 comments on commit fcbf842

Please sign in to comment.