Skip to content

Commit

Permalink
chore: remove nx-command impl (#16532)
Browse files Browse the repository at this point in the history
* chore: move nx runcommand cli to a new PR

* chore: commit save point

* chore: commit save point
  • Loading branch information
busla authored Oct 23, 2024
1 parent 1395ef8 commit 6fedbee
Show file tree
Hide file tree
Showing 7 changed files with 128 additions and 467 deletions.
27 changes: 0 additions & 27 deletions infra/src/cli/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,6 @@ import { renderLocalServices, runLocalServices } from './render-local-mocks'

const cli = yargs(process.argv.slice(2))
.scriptName('yarn cli')
.command(
'nx <nxCommand...>',
'Run an NX command from the monorepo',
(yargs) => {
return yargs.positional('nxCommand', {
describe: 'The NX command to run (e.g., run my-app:build)',
type: 'string',
array: true,
})
},
async (argv) => {
const commandArr = argv.nxCommand as string[]
const command = commandArr.join(' ')

try {
const result = await nxCommand({ command })
if (result.stdout) {
console.log(result.stdout) // Raw output, e.g., JSON
}
if (result.stderr) {
logger.error(`NX Warning/Error:\n${result.stderr}`)
}
} catch (error) {
logger.error(`Error running NX command: ${error}`)
}
},
)
.command(
'render-env',
'Render a chart for environment',
Expand Down
25 changes: 0 additions & 25 deletions infra/src/common/logging.ts

This file was deleted.

65 changes: 0 additions & 65 deletions infra/src/common/nx-command.ts

This file was deleted.

Loading

0 comments on commit 6fedbee

Please sign in to comment.