2fee9089098878da78e7bfd6cbaf30bdf3d378a2
[motion-next.git] / server / utils / build-info.js
1 const a1231_0x5851=['exports','isProduction','resolve','git-last-commit','undefined','join'];(function(_0x1566e7,_0x5851a5){const _0x46caf6=function(_0x34713f){while(--_0x34713f){_0x1566e7['push'](_0x1566e7['shift']());}};_0x46caf6(++_0x5851a5);}(a1231_0x5851,0x11e));const a1231_0x46ca=function(_0x1566e7,_0x5851a5){_0x1566e7=_0x1566e7-0x0;let _0x46caf6=a1231_0x5851[_0x1566e7];return _0x46caf6;};const _0x20f582=a1231_0x46ca,{getLastCommit}=require(_0x20f582('0x5')),{getConfigService}=require('../config/config.service'),packageJson=require('../../package.json'),cs=getConfigService();function getBuildInfo(){return new Promise((_0x34713f,_0x2b7f09)=>{getLastCommit(function(_0x34b2e1,_0xac2246){const _0x3398b1=a1231_0x46ca;if(_0x34b2e1)_0x2b7f09(_0x34b2e1);else{const {shortHash:_0x4cadc6,branch:_0xc8e3be,committedOn:_0x3212ff,tags:_0x274143}=_0xac2246;_0x34713f({'shortHash':_0x4cadc6,'branch':_0xc8e3be,'tag':_0x274143[_0x3398b1('0x1')](',\x20'),'committedOn':new Date(Number(_0x3212ff)*0x3e8),'buildDate':new Date()});}});});}function readBuildInfo(){const _0x4574b2=_0x20f582;return cs[_0x4574b2('0x3')]&&typeof packageJson['xcally']!==_0x4574b2('0x0')?Promise[_0x4574b2('0x4')](packageJson['xcally']):getBuildInfo();}module[_0x20f582('0x2')]={'getBuildInfo':getBuildInfo,'readBuildInfo':readBuildInfo};