UNPKG

kui-shell

Version:

This is the monorepo for Kui, the hybrid command-line/GUI electron-based Kubernetes tool

31 lines 1.52 kB
"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); const mode = { mode: 'Run Config', direct: (tab, _) => __awaiter(void 0, void 0, void 0, function* () { if (_.isFromFlowCommand) { const { safeDump } = yield Promise.resolve().then(() => require('js-yaml')); const models = _.model.filter(_ => _.kind === 'PipelineRun' || _.kind === 'TaskRun'); const model = models.length === 1 && models[0]; return Object.assign({ type: 'custom', isEntity: true, contentType: 'yaml', resource: model || models, content: safeDump(model || models) }, model || {}); } }), leaveBottomStripeAlone: true }; exports.default = mode; //# sourceMappingURL=run.js.map