UNPKG

1.71 kBSource Map (JSON)View Raw
1{"version":3,"sources":["../../../src/commands/ConfigCommand.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,mDAAsC;AAEtC,kDAA6C;AAC7C,6CAAwC;AAExC,MAAa,aAAa;IAA1B;QAGE,YAAO,GAAG,cAAc,CAAC;QAEzB,YAAO,GAAG,GAAG,CAAC;QAEd,aAAQ,GAAG,+BAA+B,CAAC;IAwB7C,CAAC;IArBC,OAAO,CAAC,KAAU;QAChB,OAAO,KAAK,CAAC;IACf,CAAC;IAGD,aAAa;QACX,eAAM,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IAED,aAAa;QACX,SAAG,CAAC,OAAO,CAAC,EAAC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAC,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAC,CAAC,EAAC,EAAE,KAAK,CAAC,CAAC;IAC7E,CAAC;IAGK,OAAO,CAAC,IAAS;;YACrB,IAAI,IAAI,CAAC,GAAG,EAAE;gBACZ,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,uBAAM,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;aAC5D;iBAAM;gBACL,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,uBAAM,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;aACpD;QACH,CAAC;KAAA;CACF;AA/BD,sCA+BC","file":"ConfigCommand.js","sourcesContent":["import {Config} from 'commons-config';\nimport {ICommand} from '../libs/commands/ICommand';\nimport {System} from '../libs/system/System';\nimport {Log} from '../libs/logging/Log';\n\nexport class ConfigCommand implements ICommand {\n\n\n command = 'config [key]';\n\n aliases = 'c';\n\n describe = 'Show config or config element';\n\n\n builder(yargs: any) {\n return yargs;\n }\n\n\n beforeStartup(): void {\n System.enableDistribution(false);\n }\n\n beforeStorage(): void {\n Log.options({enable: false, loggers: [{name: '*', enable: false}]}, false);\n }\n\n\n async handler(argv: any) {\n if (argv.key) {\n console.log(JSON.stringify(Config.get(argv.key), null, 2));\n } else {\n console.log(JSON.stringify(Config.all(), null, 2));\n }\n }\n}\n\n"],"sourceRoot":".."}
\No newline at end of file