UNPKG

@catladder/cli

Version:

Panter cli tool for cloud CI/CD and DevOps

28 lines (27 loc) 971 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.commandNamespace = void 0; const defineCommand_1 = require("../../../core/defineCommand"); const projects_1 = require("../../../utils/projects"); const autocompletions_1 = require("../../../apps/cli/commands/project/utils/autocompletions"); const availability_1 = require("../../availability"); exports.commandNamespace = (0, defineCommand_1.defineCommand)({ name: "project k8s namespace", description: "show namespace of local project", group: "project", isAvailable: (0, availability_1.hasDeployType)("kubernetes"), inputs: { envComponent: { type: "string", message: "environment:component", positional: true, choices: async () => (0, autocompletions_1.envAndComponents)() } }, execute: async ctx => { const envComponent = await ctx.get("envComponent"); ctx.log(await (0, projects_1.getProjectNamespace)(envComponent)); } });