diff --git a/apps/cli/src/commands/base.command.ts b/apps/cli/src/commands/base.command.ts index 1c204209..50b397b6 100644 --- a/apps/cli/src/commands/base.command.ts +++ b/apps/cli/src/commands/base.command.ts @@ -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}.` + ) } } diff --git a/apps/cli/src/commands/environment/create.environment.ts b/apps/cli/src/commands/environment/create.environment.ts index 87a4a97c..d83ab4df 100644 --- a/apps/cli/src/commands/environment/create.environment.ts +++ b/apps/cli/src/commands/environment/create.environment.ts @@ -41,6 +41,10 @@ export class CreateEnvironment extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ options, args }: CommandActionData): Promise { const [projectSlug] = args const { name, description } = await this.parseInput(options) diff --git a/apps/cli/src/commands/environment/delete.environment.ts b/apps/cli/src/commands/environment/delete.environment.ts index ef3248d4..5133dc6f 100644 --- a/apps/cli/src/commands/environment/delete.environment.ts +++ b/apps/cli/src/commands/environment/delete.environment.ts @@ -24,6 +24,10 @@ export class DeleteEnvironment extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args }: CommandActionData): Promise { const [environmentSlug] = args diff --git a/apps/cli/src/commands/environment/get.environment.ts b/apps/cli/src/commands/environment/get.environment.ts index 96a0fbaa..d2532bf9 100644 --- a/apps/cli/src/commands/environment/get.environment.ts +++ b/apps/cli/src/commands/environment/get.environment.ts @@ -24,6 +24,10 @@ export class GetEnvironment extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args }: CommandActionData): Promise { const [environmentSlug] = args diff --git a/apps/cli/src/commands/environment/list.environment.ts b/apps/cli/src/commands/environment/list.environment.ts index 4bc14c3e..c83e12b1 100644 --- a/apps/cli/src/commands/environment/list.environment.ts +++ b/apps/cli/src/commands/environment/list.environment.ts @@ -30,6 +30,10 @@ export class ListEnvironment extends BaseCommand { return PAGINATION_OPTION } + canMakeHttpRequests(): boolean { + return true + } + async action({ args, options }: CommandActionData): Promise { const [projectSlug] = args diff --git a/apps/cli/src/commands/environment/update.environment.ts b/apps/cli/src/commands/environment/update.environment.ts index 185e5279..63654b61 100644 --- a/apps/cli/src/commands/environment/update.environment.ts +++ b/apps/cli/src/commands/environment/update.environment.ts @@ -40,6 +40,10 @@ export class UpdateEnvironment extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ options, args }: CommandActionData): Promise { const [environmentSlug] = args const { name, description } = options diff --git a/apps/cli/src/commands/project/delete.project.ts b/apps/cli/src/commands/project/delete.project.ts index 6afd3d5c..f10e8b5f 100644 --- a/apps/cli/src/commands/project/delete.project.ts +++ b/apps/cli/src/commands/project/delete.project.ts @@ -24,6 +24,10 @@ export default class DeleteProject extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args }: CommandActionData): Promise { const [projectSlug] = args diff --git a/apps/cli/src/commands/project/fork.project.ts b/apps/cli/src/commands/project/fork.project.ts index 70fb7b9a..056d818e 100644 --- a/apps/cli/src/commands/project/fork.project.ts +++ b/apps/cli/src/commands/project/fork.project.ts @@ -46,6 +46,10 @@ export default class ForkProject extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ options, args }: CommandActionData): Promise { const [projectSlug] = args diff --git a/apps/cli/src/commands/project/get.project.ts b/apps/cli/src/commands/project/get.project.ts index 04c629c2..18b1db28 100644 --- a/apps/cli/src/commands/project/get.project.ts +++ b/apps/cli/src/commands/project/get.project.ts @@ -24,6 +24,10 @@ export default class GetProject extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args }: CommandActionData): Promise { const [projectSlug] = args diff --git a/apps/cli/src/commands/project/list-forks.project.ts b/apps/cli/src/commands/project/list-forks.project.ts index 243dc052..8e7c7049 100644 --- a/apps/cli/src/commands/project/list-forks.project.ts +++ b/apps/cli/src/commands/project/list-forks.project.ts @@ -24,6 +24,10 @@ export default class ListProjectForks extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args }: CommandActionData): Promise { const [projectSlug] = args diff --git a/apps/cli/src/commands/project/list.project.ts b/apps/cli/src/commands/project/list.project.ts index ede89b2a..22ac00f1 100644 --- a/apps/cli/src/commands/project/list.project.ts +++ b/apps/cli/src/commands/project/list.project.ts @@ -24,6 +24,10 @@ export default class ListProject extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args }: CommandActionData): Promise { const [workspaceSlug] = args diff --git a/apps/cli/src/commands/project/sync.project.ts b/apps/cli/src/commands/project/sync.project.ts index 262da1b2..083ee21a 100644 --- a/apps/cli/src/commands/project/sync.project.ts +++ b/apps/cli/src/commands/project/sync.project.ts @@ -37,6 +37,10 @@ export default class SyncProject extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args, options }: CommandActionData): Promise { const [projectSlug] = args diff --git a/apps/cli/src/commands/project/unlink.project.ts b/apps/cli/src/commands/project/unlink.project.ts index 9aae21ec..d3291d13 100644 --- a/apps/cli/src/commands/project/unlink.project.ts +++ b/apps/cli/src/commands/project/unlink.project.ts @@ -25,6 +25,10 @@ export default class UnlinkProject extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args }: CommandActionData): Promise { const [projectSlug] = args diff --git a/apps/cli/src/commands/project/update.project.ts b/apps/cli/src/commands/project/update.project.ts index 352b6916..c7cb6221 100644 --- a/apps/cli/src/commands/project/update.project.ts +++ b/apps/cli/src/commands/project/update.project.ts @@ -53,6 +53,10 @@ export default class UpdateProject extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args, options }: CommandActionData): Promise { const [projectSlug] = args diff --git a/apps/cli/src/commands/secret/create.secret.ts b/apps/cli/src/commands/secret/create.secret.ts index 74ceba07..63a65aca 100644 --- a/apps/cli/src/commands/secret/create.secret.ts +++ b/apps/cli/src/commands/secret/create.secret.ts @@ -53,6 +53,10 @@ export default class CreateSecret extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args, options }: CommandActionData): Promise { const { name, note, rotateAfter, entries } = await this.parseInput(options) const [projectSlug] = args diff --git a/apps/cli/src/commands/secret/delete.secret.ts b/apps/cli/src/commands/secret/delete.secret.ts index 1e709e00..d77a5947 100644 --- a/apps/cli/src/commands/secret/delete.secret.ts +++ b/apps/cli/src/commands/secret/delete.secret.ts @@ -24,6 +24,10 @@ export default class DeleteSecret extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args }: CommandActionData): Promise { const [secretSlug] = args diff --git a/apps/cli/src/commands/secret/get.secret.ts b/apps/cli/src/commands/secret/get.secret.ts index b015ed23..94df3d86 100644 --- a/apps/cli/src/commands/secret/get.secret.ts +++ b/apps/cli/src/commands/secret/get.secret.ts @@ -36,6 +36,10 @@ export default class GetSecret extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args, options }: CommandActionData): Promise { const [projectSlug] = args const { decryptValue } = await this.parseInput(options) diff --git a/apps/cli/src/commands/secret/list.secret.ts b/apps/cli/src/commands/secret/list.secret.ts index 340ad951..9d652072 100644 --- a/apps/cli/src/commands/secret/list.secret.ts +++ b/apps/cli/src/commands/secret/list.secret.ts @@ -24,6 +24,10 @@ export default class ListSecret extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args }: CommandActionData): Promise { const [projectSlug] = args diff --git a/apps/cli/src/commands/secret/revisions.secret.ts b/apps/cli/src/commands/secret/revisions.secret.ts index 02549788..a810cc2c 100644 --- a/apps/cli/src/commands/secret/revisions.secret.ts +++ b/apps/cli/src/commands/secret/revisions.secret.ts @@ -35,6 +35,10 @@ export default class FetchSecretRevisions extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args, options }: CommandActionData): Promise { const [secretSlug] = args const { environment } = options diff --git a/apps/cli/src/commands/secret/rollback.secret.ts b/apps/cli/src/commands/secret/rollback.secret.ts index 966b446f..9e507ae9 100644 --- a/apps/cli/src/commands/secret/rollback.secret.ts +++ b/apps/cli/src/commands/secret/rollback.secret.ts @@ -41,6 +41,10 @@ export default class RollbackSecret extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args, options }: CommandActionData): Promise { const [secretSlug] = args const { environment, version } = await this.parseInput(options) diff --git a/apps/cli/src/commands/secret/update.secret.ts b/apps/cli/src/commands/secret/update.secret.ts index 281c3d93..dc72b083 100644 --- a/apps/cli/src/commands/secret/update.secret.ts +++ b/apps/cli/src/commands/secret/update.secret.ts @@ -52,6 +52,10 @@ export default class UpdateSecret extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args, options }: CommandActionData): Promise { const [secretSlug] = args diff --git a/apps/cli/src/commands/variable/create.variable.ts b/apps/cli/src/commands/variable/create.variable.ts index 7bfdb8b1..6934b97b 100644 --- a/apps/cli/src/commands/variable/create.variable.ts +++ b/apps/cli/src/commands/variable/create.variable.ts @@ -48,6 +48,10 @@ export default class CreateVariable extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args, options }: CommandActionData): Promise { const { name, note, entries } = await this.parseInput(options) const [projectSlug] = args diff --git a/apps/cli/src/commands/variable/delete.variable.ts b/apps/cli/src/commands/variable/delete.variable.ts index 1ac432d6..231b1bdd 100644 --- a/apps/cli/src/commands/variable/delete.variable.ts +++ b/apps/cli/src/commands/variable/delete.variable.ts @@ -24,6 +24,10 @@ export default class DeleteVariable extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args }: CommandActionData): Promise { const [variableSlug] = args diff --git a/apps/cli/src/commands/variable/list.variable.ts b/apps/cli/src/commands/variable/list.variable.ts index d718883b..8795ac7d 100644 --- a/apps/cli/src/commands/variable/list.variable.ts +++ b/apps/cli/src/commands/variable/list.variable.ts @@ -24,6 +24,10 @@ export default class ListVariable extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args }: CommandActionData): Promise { const [projectSlug] = args const { data, error, success } = diff --git a/apps/cli/src/commands/variable/revisions.variable.ts b/apps/cli/src/commands/variable/revisions.variable.ts index 8f2f753a..44f90ba9 100644 --- a/apps/cli/src/commands/variable/revisions.variable.ts +++ b/apps/cli/src/commands/variable/revisions.variable.ts @@ -41,6 +41,10 @@ export default class FetchVariableRevisions extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args, options }: CommandActionData): Promise { const [variableSlug] = args const { environment } = options diff --git a/apps/cli/src/commands/variable/rollback.variable.ts b/apps/cli/src/commands/variable/rollback.variable.ts index fbf92640..250f7723 100644 --- a/apps/cli/src/commands/variable/rollback.variable.ts +++ b/apps/cli/src/commands/variable/rollback.variable.ts @@ -41,6 +41,10 @@ export default class RollbackVariable extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args, options }: CommandActionData): Promise { const [variableSlug] = args const { environment, version } = await this.parseInput(options) diff --git a/apps/cli/src/commands/variable/update.variable.ts b/apps/cli/src/commands/variable/update.variable.ts index b50fc150..4e290ebc 100644 --- a/apps/cli/src/commands/variable/update.variable.ts +++ b/apps/cli/src/commands/variable/update.variable.ts @@ -45,6 +45,10 @@ export default class UpdateVariable extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args, options }: CommandActionData): Promise { const [variableSlug] = args diff --git a/apps/cli/src/commands/workspace/create.workspace.ts b/apps/cli/src/commands/workspace/create.workspace.ts index 00c48cd2..ef3e6982 100644 --- a/apps/cli/src/commands/workspace/create.workspace.ts +++ b/apps/cli/src/commands/workspace/create.workspace.ts @@ -31,6 +31,10 @@ export default class CreateWorkspace extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ options }: CommandActionData): Promise { const { name, icon } = await this.parseInput(options) diff --git a/apps/cli/src/commands/workspace/delete.workspace.ts b/apps/cli/src/commands/workspace/delete.workspace.ts index 4a44044a..6337c834 100644 --- a/apps/cli/src/commands/workspace/delete.workspace.ts +++ b/apps/cli/src/commands/workspace/delete.workspace.ts @@ -24,6 +24,10 @@ export default class DeleteWorkspace extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args }: CommandActionData): Promise { const [workspaceSlug] = args diff --git a/apps/cli/src/commands/workspace/export.workspace.ts b/apps/cli/src/commands/workspace/export.workspace.ts index ae4763db..7711a1c9 100644 --- a/apps/cli/src/commands/workspace/export.workspace.ts +++ b/apps/cli/src/commands/workspace/export.workspace.ts @@ -36,6 +36,10 @@ export default class ExportWorkspace extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args, options }: CommandActionData): Promise { const [workspaceSlug] = args const { saveToFile } = options as { saveToFile: string } diff --git a/apps/cli/src/commands/workspace/get.workspace.ts b/apps/cli/src/commands/workspace/get.workspace.ts index d13aa639..75d52f76 100644 --- a/apps/cli/src/commands/workspace/get.workspace.ts +++ b/apps/cli/src/commands/workspace/get.workspace.ts @@ -24,6 +24,10 @@ export default class GetWorkspace extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args }: CommandActionData): Promise { const [workspaceSlug] = args diff --git a/apps/cli/src/commands/workspace/list.workspace.ts b/apps/cli/src/commands/workspace/list.workspace.ts index 20c8cab3..b2221653 100644 --- a/apps/cli/src/commands/workspace/list.workspace.ts +++ b/apps/cli/src/commands/workspace/list.workspace.ts @@ -20,6 +20,10 @@ export default class ListWorkspace extends BaseCommand { return PAGINATION_OPTION } + canMakeHttpRequests(): boolean { + return true + } + async action({ options }: CommandActionData): Promise { Logger.info('Fetching all workspaces...') diff --git a/apps/cli/src/commands/workspace/membership/get-all-members.membership.ts b/apps/cli/src/commands/workspace/membership/get-all-members.membership.ts index 2d1f9753..fd0bce31 100644 --- a/apps/cli/src/commands/workspace/membership/get-all-members.membership.ts +++ b/apps/cli/src/commands/workspace/membership/get-all-members.membership.ts @@ -30,6 +30,10 @@ export default class GetAllMembersOfWorkspaceCommand extends BaseCommand { return PAGINATION_OPTION } + canMakeHttpRequests(): boolean { + return true + } + async action({ args, options }: CommandActionData): Promise { Logger.info("Fetching workspace's members...") diff --git a/apps/cli/src/commands/workspace/role/create.role.ts b/apps/cli/src/commands/workspace/role/create.role.ts index c1695c3c..6a6f0aeb 100644 --- a/apps/cli/src/commands/workspace/role/create.role.ts +++ b/apps/cli/src/commands/workspace/role/create.role.ts @@ -61,6 +61,10 @@ export default class CreateRoleCommand extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args, options }: CommandActionData): Promise { const [workspaceSlug] = args const { diff --git a/apps/cli/src/commands/workspace/role/delete.role.ts b/apps/cli/src/commands/workspace/role/delete.role.ts index 0127b8bb..12057f0d 100644 --- a/apps/cli/src/commands/workspace/role/delete.role.ts +++ b/apps/cli/src/commands/workspace/role/delete.role.ts @@ -24,6 +24,10 @@ export default class DeleteRoleCommand extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args }: CommandActionData): Promise { const [workspaceRoleSlug] = args diff --git a/apps/cli/src/commands/workspace/role/get.role.ts b/apps/cli/src/commands/workspace/role/get.role.ts index 8c8ce372..42f006e5 100644 --- a/apps/cli/src/commands/workspace/role/get.role.ts +++ b/apps/cli/src/commands/workspace/role/get.role.ts @@ -24,6 +24,10 @@ export default class GetRoleCommand extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args }: CommandActionData): Promise { const [workspaceRoleSlug] = args diff --git a/apps/cli/src/commands/workspace/role/list.role.ts b/apps/cli/src/commands/workspace/role/list.role.ts index 8d28d199..11a595fb 100644 --- a/apps/cli/src/commands/workspace/role/list.role.ts +++ b/apps/cli/src/commands/workspace/role/list.role.ts @@ -30,6 +30,10 @@ export default class ListRoleCommand extends BaseCommand { return PAGINATION_OPTION } + canMakeHttpRequests(): boolean { + return true + } + async action({ args, options }: CommandActionData): Promise { Logger.info("Fetching workspace's roles...") diff --git a/apps/cli/src/commands/workspace/role/update.role.ts b/apps/cli/src/commands/workspace/role/update.role.ts index 91dc679e..e692f2b5 100644 --- a/apps/cli/src/commands/workspace/role/update.role.ts +++ b/apps/cli/src/commands/workspace/role/update.role.ts @@ -61,6 +61,10 @@ export default class UpdateRoleCommand extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args, options }: CommandActionData): Promise { const [workspaceRoleSlug] = args const { diff --git a/apps/cli/src/commands/workspace/search.workspace.ts b/apps/cli/src/commands/workspace/search.workspace.ts index 2d4e287b..4844ac9a 100644 --- a/apps/cli/src/commands/workspace/search.workspace.ts +++ b/apps/cli/src/commands/workspace/search.workspace.ts @@ -28,6 +28,10 @@ export default class SearchWorkspace extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args }: CommandActionData): Promise { const [workspaceSlug, searchTerm] = args diff --git a/apps/cli/src/commands/workspace/update.workspace.ts b/apps/cli/src/commands/workspace/update.workspace.ts index cb707e1a..535ec374 100644 --- a/apps/cli/src/commands/workspace/update.workspace.ts +++ b/apps/cli/src/commands/workspace/update.workspace.ts @@ -40,6 +40,10 @@ export default class UpdateWorkspace extends BaseCommand { ] } + canMakeHttpRequests(): boolean { + return true + } + async action({ args, options }: CommandActionData): Promise { const [workspaceSlug] = args const { name, icon } = options diff --git a/packages/api-client/src/controllers/app.ts b/packages/api-client/src/controllers/app.ts index 3b3640ad..20d31718 100644 --- a/packages/api-client/src/controllers/app.ts +++ b/packages/api-client/src/controllers/app.ts @@ -7,9 +7,7 @@ export default class AppController { this.apiClient = new APIClient(this.backendURL) } - async health( - headers?: Record - ): Promise { + async health(headers?: Record): Promise { const response = await this.apiClient.get(`/api/health`, headers) return response.text() }