sesterce-cli
Version:
A powerful command-line interface tool for managing Sesterce Cloud services. Sesterce CLI provides easy access to GPU cloud instances, AI inference services, container registries, and SSH key management directly from your terminal.
21 lines • 911 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ListLaunchedInstances = void 0;
const either_1 = require("@/core/logic/either");
const list_launched_instances_error_1 = require("./errors/list-launched-instances-error");
class ListLaunchedInstances {
constructor(apiClient) {
this.apiClient = apiClient;
}
async execute() {
try {
const instances = await this.apiClient.request("/gpu-cloud/instances");
return (0, either_1.right)(instances !== null && instances !== void 0 ? instances : []);
}
catch (error) {
return (0, either_1.left)(new list_launched_instances_error_1.ListLaunchedInstancesError(error instanceof Error ? error.message : "Unexpected error occurred."));
}
}
}
exports.ListLaunchedInstances = ListLaunchedInstances;
//# sourceMappingURL=list-launched-instances.js.map