1import * as _ from 'lodash-es' 8const getEpdepsLines = () => { 10 if (!appCfg) return [] 11 const { dbQsCfg } = appCfg as {dbQsCfg?: {dbQsName?: string}} 12 const dbQsName = dbQsCfg?.dbQsName 13 if (!dbQsName) return [] 16 if (dbEps.length === 0) return [] 21 ..._.map(dbEps, ep => ` ${ep.regEpPath}`) 25export const k8sBuiltinActions = { 26 apply: { cliDescript: 'deploy to k8s', cliSchema: applyCli }, 27 delete: { cliDescript: 'kubectl delete -f [action=resources] ( excludes pvcs for safety see delpvcs )' }, 28 info: { cliDescript: 'show k8s resources & debug info' }, 29 help: { cliDescript: '[action] may show more help' }, 30 fexec: { cliDescript: 'shell into first pod' }, 33export const k8sCliBase = (opts?: Record<string, unknown>) => cliBase({ 35 builtinActions: k8sBuiltinActions, 36 getExtraHelpLines: getEpdepsLines, 37} as unknown as Parameters<typeof cliBase>[0])