Skip to content

Commit

Permalink
fixed cli build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rajdip-b committed Nov 27, 2024
1 parent 6acf766 commit d48373f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 22 deletions.
6 changes: 1 addition & 5 deletions apps/cli/src/commands/secret/rollback.secret.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,7 @@ export default class RollbackSecret extends BaseCommand {
)

if (success) {
Logger.info(`Secret ${data.name} (${data.slug}) updated successfully!`)
Logger.info(`Created at ${data.createdAt}`)
Logger.info(`Updated at ${data.updatedAt}`)
Logger.info(`Note: ${data.note}`)
Logger.info(`rotateAfter: ${data.rotateAfter}`)
Logger.info(`Secret rolled back by ${data.count} versions successfully.`)
} else {
Logger.error(`Failed to update secret: ${error.message}`)
}
Expand Down
8 changes: 2 additions & 6 deletions apps/cli/src/commands/secret/update.secret.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default class UpdateSecret extends BaseCommand {
async action({ args, options }: CommandActionData): Promise<void> {
const [secretSlug] = args

const { data, error, success } =
const { error, success } =
await ControllerInstance.getInstance().secretController.updateSecret(
{
secretSlug,
Expand All @@ -65,11 +65,7 @@ export default class UpdateSecret extends BaseCommand {
)

if (success) {
Logger.info(`Secret ${data.name} (${data.slug}) updated successfully!`)
Logger.info(`Created at ${data.createdAt}`)
Logger.info(`Updated at ${data.updatedAt}`)
Logger.info(`Note: ${data.note}`)
Logger.info(`rotateAfter: ${data.rotateAfter}`)
Logger.info('Secret updated successfully')
} else {
Logger.error(`Failed to update secret: ${error.message}`)
}
Expand Down
11 changes: 5 additions & 6 deletions apps/cli/src/commands/variable/rollback.variable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,24 +55,23 @@ export default class RollbackVariable extends BaseCommand {
)

if (success) {
Logger.info(`Variable ${data.name} (${data.slug}) updated successfully!`)
Logger.info(`Created at ${data.createdAt}`)
Logger.info(`Updated at ${data.updatedAt}`)
Logger.info(`Note: ${data.note}`)
Logger.info(
`Variable rolled back by ${data.count} versions successfully!`
)
} else {
Logger.error(`Failed to update variable: ${error.message}`)
}
}

private async parseInput(options: CommandActionData['options']): Promise<{
environmentSlug: string
version: string
version: number
}> {
const { environmentSlug, version } = options

return {
environmentSlug,
version
version: parseInt(version, 10)
}
}
}
7 changes: 2 additions & 5 deletions apps/cli/src/commands/variable/update.variable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default class UpdateVariable extends BaseCommand {
async action({ args, options }: CommandActionData): Promise<void> {
const [variableSlug] = args

const { data, error, success } =
const { error, success } =
await ControllerInstance.getInstance().variableController.updateVariable(
{
variableSlug,
Expand All @@ -58,10 +58,7 @@ export default class UpdateVariable extends BaseCommand {
)

if (success) {
Logger.info(`Variable ${data.name} (${data.slug}) updated successfully!`)
Logger.info(`Created at ${data.createdAt}`)
Logger.info(`Updated at ${data.updatedAt}`)
Logger.info(`Note: ${data.note}`)
Logger.info('Variable updated successfully!')
} else {
Logger.error(`Failed to update variable: ${error.message}`)
}
Expand Down

0 comments on commit d48373f

Please sign in to comment.