@veecode-platform/safira-cli
Version:
Generate a microservice project from your spec.
31 lines (30 loc) • 1.39 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const color_1 = tslib_1.__importDefault(require("@oclif/color"));
const core_1 = require("@oclif/core");
const okteto_client_1 = require("../../../okteto/okteto-client");
const okteto_base_command_1 = require("../../../base-command/okteto-base-command");
class OktetoContextUse extends okteto_base_command_1.OktetoBaseCommand {
async run() {
const { args, flags } = await this.parse(OktetoContextUse);
try {
new okteto_client_1.OktetoClient().contextUse({ builder: flags.builder || "", namespace: flags.namespace || "", token: flags.token || "" });
}
catch (error) {
this.log(color_1.default.red(error.message));
}
}
}
exports.default = OktetoContextUse;
OktetoContextUse.description = "Set the default okteto context";
OktetoContextUse.examples = [
"<%= config.bin %> <%= command.id %>",
];
OktetoContextUse.flags = {
help: core_1.Flags.boolean({ description: "help for use" }),
builder: core_1.Flags.string({ char: "b", description: "url of the builder service" }),
namespace: core_1.Flags.string({ char: "n", description: "namespace of your okteto context" }),
token: core_1.Flags.string({ char: "t", description: "API token for authentication" }),
};
OktetoContextUse.args = [];