Skip to content

Commit

Permalink
Missing canMakeHttpRequests overrides added to commands
Browse files Browse the repository at this point in the history
  • Loading branch information
csehatt741 committed Jan 20, 2025
1 parent 9b354b1 commit 544e34f
Show file tree
Hide file tree
Showing 41 changed files with 164 additions and 7 deletions.
11 changes: 7 additions & 4 deletions apps/cli/src/commands/base.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,13 @@ export default abstract class BaseCommand {
}

try {
await ControllerInstance.getInstance().appController.health(this.headers)
}
catch {
throw new Error(`Could not connect to the server: ${this.baseUrl}.`)
await ControllerInstance.getInstance().appController.health(
this.headers
)
} catch {
throw new Error(
`Could not connect to the server: ${this.baseUrl}.`
)
}
}

Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/environment/create.environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ export class CreateEnvironment extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ options, args }: CommandActionData): Promise<void> {
const [projectSlug] = args
const { name, description } = await this.parseInput(options)
Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/environment/delete.environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export class DeleteEnvironment extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ args }: CommandActionData): Promise<void> {
const [environmentSlug] = args

Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/environment/get.environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export class GetEnvironment extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ args }: CommandActionData): Promise<void> {
const [environmentSlug] = args

Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/environment/list.environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ export class ListEnvironment extends BaseCommand {
return PAGINATION_OPTION
}

canMakeHttpRequests(): boolean {
return true
}

async action({ args, options }: CommandActionData): Promise<void> {
const [projectSlug] = args

Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/environment/update.environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ export class UpdateEnvironment extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ options, args }: CommandActionData): Promise<void> {
const [environmentSlug] = args
const { name, description } = options
Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/project/delete.project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export default class DeleteProject extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ args }: CommandActionData): Promise<void> {
const [projectSlug] = args

Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/project/fork.project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ export default class ForkProject extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ options, args }: CommandActionData): Promise<void> {
const [projectSlug] = args

Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/project/get.project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export default class GetProject extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ args }: CommandActionData): Promise<void> {
const [projectSlug] = args

Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/project/list-forks.project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export default class ListProjectForks extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ args }: CommandActionData): Promise<void> {
const [projectSlug] = args

Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/project/list.project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export default class ListProject extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ args }: CommandActionData): Promise<void> {
const [workspaceSlug] = args

Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/project/sync.project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ export default class SyncProject extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ args, options }: CommandActionData): Promise<void> {
const [projectSlug] = args

Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/project/unlink.project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export default class UnlinkProject extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ args }: CommandActionData): Promise<void> {
const [projectSlug] = args

Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/project/update.project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ export default class UpdateProject extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ args, options }: CommandActionData): Promise<void> {
const [projectSlug] = args

Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/secret/create.secret.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ export default class CreateSecret extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ args, options }: CommandActionData): Promise<void> {
const { name, note, rotateAfter, entries } = await this.parseInput(options)
const [projectSlug] = args
Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/secret/delete.secret.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export default class DeleteSecret extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ args }: CommandActionData): Promise<void> {
const [secretSlug] = args

Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/secret/get.secret.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ export default class GetSecret extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ args, options }: CommandActionData): Promise<void> {
const [projectSlug] = args
const { decryptValue } = await this.parseInput(options)
Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/secret/list.secret.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export default class ListSecret extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ args }: CommandActionData): Promise<void> {
const [projectSlug] = args

Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/secret/revisions.secret.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ export default class FetchSecretRevisions extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ args, options }: CommandActionData): Promise<void> {
const [secretSlug] = args
const { environment } = options
Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/secret/rollback.secret.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ export default class RollbackSecret extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ args, options }: CommandActionData): Promise<void> {
const [secretSlug] = args
const { environment, version } = await this.parseInput(options)
Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/secret/update.secret.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ export default class UpdateSecret extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ args, options }: CommandActionData): Promise<void> {
const [secretSlug] = args

Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/variable/create.variable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ export default class CreateVariable extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ args, options }: CommandActionData): Promise<void> {
const { name, note, entries } = await this.parseInput(options)
const [projectSlug] = args
Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/variable/delete.variable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export default class DeleteVariable extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ args }: CommandActionData): Promise<void> {
const [variableSlug] = args

Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/variable/list.variable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export default class ListVariable extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ args }: CommandActionData): Promise<void> {
const [projectSlug] = args
const { data, error, success } =
Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/variable/revisions.variable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ export default class FetchVariableRevisions extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ args, options }: CommandActionData): Promise<void> {
const [variableSlug] = args
const { environment } = options
Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/variable/rollback.variable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ export default class RollbackVariable extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ args, options }: CommandActionData): Promise<void> {
const [variableSlug] = args
const { environment, version } = await this.parseInput(options)
Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/variable/update.variable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ export default class UpdateVariable extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ args, options }: CommandActionData): Promise<void> {
const [variableSlug] = args

Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/workspace/create.workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ export default class CreateWorkspace extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ options }: CommandActionData): Promise<void> {
const { name, icon } = await this.parseInput(options)

Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/workspace/delete.workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export default class DeleteWorkspace extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ args }: CommandActionData): Promise<void> {
const [workspaceSlug] = args

Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/workspace/export.workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ export default class ExportWorkspace extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ args, options }: CommandActionData): Promise<void> {
const [workspaceSlug] = args
const { saveToFile } = options as { saveToFile: string }
Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/workspace/get.workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export default class GetWorkspace extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ args }: CommandActionData): Promise<void> {
const [workspaceSlug] = args

Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/workspace/list.workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ export default class ListWorkspace extends BaseCommand {
return PAGINATION_OPTION
}

canMakeHttpRequests(): boolean {
return true
}

async action({ options }: CommandActionData): Promise<void> {
Logger.info('Fetching all workspaces...')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ export default class GetAllMembersOfWorkspaceCommand extends BaseCommand {
return PAGINATION_OPTION
}

canMakeHttpRequests(): boolean {
return true
}

async action({ args, options }: CommandActionData): Promise<void> {
Logger.info("Fetching workspace's members...")

Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/workspace/role/create.role.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ export default class CreateRoleCommand extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ args, options }: CommandActionData): Promise<void> {
const [workspaceSlug] = args
const {
Expand Down
4 changes: 4 additions & 0 deletions apps/cli/src/commands/workspace/role/delete.role.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export default class DeleteRoleCommand extends BaseCommand {
]
}

canMakeHttpRequests(): boolean {
return true
}

async action({ args }: CommandActionData): Promise<void> {
const [workspaceRoleSlug] = args

Expand Down
Loading

0 comments on commit 544e34f

Please sign in to comment.