jjb-cmd 2.5.9 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "env": "prod",
5
5
  "httpMethod": "http",
6
6
  "pushMessage": "yes",
7
- "version": "2.5.9",
7
+ "version": "2.6.0",
8
8
  "description": "jjb-cmd命令行工具",
9
9
  "main": "index.js",
10
10
  "scripts": {
package/src/ai-pull.js CHANGED
@@ -1 +1 @@
1
- const a0_0x39adc1=a0_0x3bd1;function a0_0x28d8(){const _0x3616c0=['state.vscdb','5613972yMspCn','lastInsertRowid','部分文件复制失败','【Warning】:','✓\x20已将\x20','源目录不存在:\x20','admin','9667098mVAVjH','步骤3:\x20正在更新\x20Cursor\x20user\x20rules\x20(SQLite\x20数据库)...','statSync','32296DLTFIk','get','.config','【Error】:更新后内容不匹配!','Library','filter','【Error】:数据库被锁定,可能是\x20Cursor\x20正在使用','【调试】:找到现有记录,当前长度:\x20','Cursor','\x20\x20实际前100字符:\x20','【Error】:插入失败,未返回插入ID','PROJECT.md',',\x20实际长度:\x20','【Error】:验证插入失败','.gitignore','88551dNkmOc','【Error】:处理\x20admin/rules/PROJECT.md\x20失败','execSync','【提示】:请重启\x20Cursor\x20编辑器以使规则生效','run','changes','✓\x20PROJECT.md\x20已添加到\x20Cursor\x20user\x20rules\x20(','✓\x20admin/rules/PROJECT.md\x20内容未变化,无需更新','26EXYGit','forEach','【Error】:复制\x20','复制文件失败,已重试多次:\x20','\x20字节','Database','rmdirSync','split','now','prepare','startsWith','【调试】:准备更新数据库,内容长度:\x20','UPDATE\x20ItemTable\x20SET\x20value\x20=\x20?\x20WHERE\x20key\x20=\x20?','pipe','【Error】:未找到\x20SQLite\x20模块\x20(better-sqlite3\x20或\x20sqlite3)','【分支】:','EBUSY','.cursor','.backup.','rules','createReadStream','SELECT\x20value,\x20length(value)\x20as\x20len\x20FROM\x20ItemTable\x20WHERE\x20key\x20=\x20?','.cursor/\x0a','dirname','EACCES','locked','aicontext.personalContext','INSERT\x20INTO\x20ItemTable\x20(key,\x20value)\x20VALUES\x20(?,\x20?)','【调试】:插入结果,最后插入ID:\x20','AppData','【Warning】:处理文件失败\x20','✓\x20已创建\x20.gitignore\x20并添加\x20.cursor/\x20忽略规则','close','test','slice','【Warning】:备份数据库文件失败','...','User','【Error】:验证更新失败','【Warning】:复制文件失败\x20','【Warning】:仓库中未找到\x20admin/rules/PROJECT.md\x20文件','✓\x20已在\x20.gitignore\x20中添加\x20.cursor/\x20忽略规则','【jjb-cmd\x20ai-pull】:执行完成!','【Warning】:可能\x20Cursor\x20未安装或路径不正确,请手动复制\x20admin/rules/PROJECT.md\x20内容','path','【调试】:更新影响行数:\x20','971141cYakzP','better-sqlite3','EPERM','createWriteStream','Application\x20Support','git\x20clone\x20-b\x20','\x20\x20期望前100字符:\x20','\x20失败','readFileSync','29645gXSIOs','message','len','【Error】:拉取仓库失败','✓\x20已删除旧备份文件:\x20','【Error】:插入后验证失败,值为空','platform','isBuffer','endsWith','【Error】:创建\x20.cursor\x20目录失败','✓\x20.gitignore\x20中已存在\x20.cursor\x20忽略规则','361605keKfwM','isDirectory','readdirSync','error','【预览】:内容前3行:\x0a','substring','copyFileSync','code','【Error】:插入后内容不匹配!','utf8','【Error】:操作数据库失败','【建议】:请确保已安装\x20Cursor\x20编辑器,或手动复制\x20admin/rules/PROJECT.md\x20内容','toString','existsSync','includes','length','admin/.cursor','步骤4:\x20正在检查\x20.gitignore\x20文件...','mkdirSync','【jjb-cmd\x20ai-pull】:开始执行...','\x20\x20期望长度:\x20','SQLITE_BUSY','http://192.168.1.242:10985/root/jjb-ai.git',')...','join','8160UMnzYd','228gRKCjf','unlinkSync','tmpdir','【Error】:读取\x20','\x20目录失败','Roaming','log','v_2.0.0','basename','sqlite3','【调试】:记录不存在,将插入新记录','✓\x20已备份数据库文件到\x20','\x20字节)','value','【Error】:更新后验证失败,值为空','globalStorage','\x20字符','✓\x20PROJECT.md\x20已更新到\x20Cursor\x20user\x20rules\x20(','1424kXaCxQ','【建议】:请关闭\x20Cursor\x20编辑器后重试','【建议】:请运行\x20npm\x20install\x20better-sqlite3\x20或\x20npm\x20install\x20sqlite3','writeFileSync','\x20下没有子文件夹可同步'];a0_0x28d8=function(){return _0x3616c0;};return a0_0x28d8();}(function(_0x1e58e5,_0x571464){const _0x2dca5f=a0_0x3bd1,_0x22b1d9=_0x1e58e5();while(!![]){try{const _0x34f58d=parseInt(_0x2dca5f(0x15b))/0x1+parseInt(_0x2dca5f(0x12d))/0x2*(parseInt(_0x2dca5f(0x16f))/0x3)+parseInt(_0x2dca5f(0x1a1))/0x4+-parseInt(_0x2dca5f(0x164))/0x5*(parseInt(_0x2dca5f(0x189))/0x6)+parseInt(_0x2dca5f(0x1a8))/0x7+-parseInt(_0x2dca5f(0x19b))/0x8*(parseInt(_0x2dca5f(0x125))/0x9)+parseInt(_0x2dca5f(0x188))/0xa*(-parseInt(_0x2dca5f(0x1ab))/0xb);if(_0x34f58d===_0x571464)break;else _0x22b1d9['push'](_0x22b1d9['shift']());}catch(_0x46b377){_0x22b1d9['push'](_0x22b1d9['shift']());}}}(a0_0x28d8,0xe7fa7));const fs=require('fs'),os=require('os'),path=require(a0_0x39adc1(0x159)),child_process=require('child_process');function getCursorDbPath(){const _0x343e19=a0_0x39adc1,_0x5dfd85=os['homedir'](),_0x2ee6a6=os[_0x343e19(0x16a)]();if(_0x2ee6a6==='win32')return path[_0x343e19(0x187)](_0x5dfd85,_0x343e19(0x14a),_0x343e19(0x18e),_0x343e19(0x1b3),_0x343e19(0x152),_0x343e19(0x198),_0x343e19(0x1a0));else return _0x2ee6a6==='darwin'?path[_0x343e19(0x187)](_0x5dfd85,_0x343e19(0x1af),_0x343e19(0x15f),_0x343e19(0x1b3),_0x343e19(0x152),_0x343e19(0x198),_0x343e19(0x1a0)):path[_0x343e19(0x187)](_0x5dfd85,_0x343e19(0x1ad),'Cursor','User',_0x343e19(0x198),'state.vscdb');}const CURSOR_DB_PATH=getCursorDbPath(),AI_REPO_URL=a0_0x39adc1(0x185),DEFAULT_BRANCH=a0_0x39adc1(0x190);function deleteDir(_0x4c609c,_0x4ef2c1){if(!fs['existsSync'](_0x4c609c)){_0x4ef2c1&&_0x4ef2c1();return;}function _0x2b09a0(_0x239fee){const _0x53ec07=a0_0x3bd1;if(!fs[_0x53ec07(0x17c)](_0x239fee))return;try{const _0x74a9cd=fs[_0x53ec07(0x171)](_0x239fee);for(let _0x43dfb9=0x0;_0x43dfb9<_0x74a9cd[_0x53ec07(0x17e)];_0x43dfb9++){const _0x11b483=_0x74a9cd[_0x43dfb9],_0x2b6b88=path[_0x53ec07(0x187)](_0x239fee,_0x11b483),_0xb149c5=fs[_0x53ec07(0x1aa)](_0x2b6b88);if(_0xb149c5[_0x53ec07(0x170)]()){_0x2b09a0(_0x2b6b88);try{fs[_0x53ec07(0x133)](_0x2b6b88);}catch(_0x4ca58b){}}else try{fs[_0x53ec07(0x18a)](_0x2b6b88);}catch(_0x22a2f7){}}try{fs[_0x53ec07(0x133)](_0x239fee);}catch(_0x384d32){}}catch(_0x4ce3df){}}_0x2b09a0(_0x4c609c),setTimeout(()=>{_0x4ef2c1&&_0x4ef2c1();},0x12c);}function copyFolder(_0x45b6e0,_0x5d33d5,_0x119628){const _0x33a8de=a0_0x39adc1;if(!fs[_0x33a8de(0x17c)](_0x45b6e0)){_0x119628&&_0x119628(new Error(_0x33a8de(0x1a6)+_0x45b6e0));return;}if(!fs['existsSync'](_0x5d33d5))try{fs[_0x33a8de(0x181)](_0x5d33d5,{'recursive':!![]});}catch(_0x8cfd37){_0x119628&&_0x119628(_0x8cfd37);return;}copyFolderRecursive(_0x45b6e0,_0x5d33d5,_0x119628);}function a0_0x3bd1(_0x48eefa,_0x111ba1){_0x48eefa=_0x48eefa-0x125;const _0x28d82f=a0_0x28d8();let _0x3bd1b2=_0x28d82f[_0x48eefa];return _0x3bd1b2;}function copyFolderRecursive(_0x192325,_0x4aea90,_0xf9d679){const _0x18432e=a0_0x39adc1;if(!fs[_0x18432e(0x17c)](_0x192325)){_0xf9d679&&_0xf9d679(new Error(_0x18432e(0x1a6)+_0x192325));return;}try{const _0x1a115b=fs['readdirSync'](_0x192325);let _0xacc71d=0x0,_0x1c54d6=![];if(_0x1a115b['length']===0x0){_0xf9d679&&_0xf9d679();return;}_0x1a115b[_0x18432e(0x12e)](_0xd1fcd5=>{const _0x569e12=_0x18432e,_0x25635d=path[_0x569e12(0x187)](_0x192325,_0xd1fcd5),_0x3e6a56=path[_0x569e12(0x187)](_0x4aea90,_0xd1fcd5);try{const _0x563428=fs[_0x569e12(0x1aa)](_0x25635d);_0x563428[_0x569e12(0x170)]()?(!fs['existsSync'](_0x3e6a56)&&fs['mkdirSync'](_0x3e6a56,{'recursive':!![]}),copyFolderRecursive(_0x25635d,_0x3e6a56,_0x30c4df=>{const _0x958a9c=_0x569e12;_0xacc71d++,_0x30c4df&&!_0x1c54d6&&(_0x1c54d6=!![],console[_0x958a9c(0x18f)]('【Warning】:复制目录失败\x20'+_0x25635d+':\x20'+_0x30c4df['message'])),_0xacc71d===_0x1a115b['length']&&(_0xf9d679&&_0xf9d679(_0x1c54d6?new Error(_0x958a9c(0x1a3)):null));})):copyFileWithRetry(_0x25635d,_0x3e6a56,0x3,_0x1521cc=>{const _0x16d5a9=_0x569e12;_0xacc71d++,_0x1521cc&&!_0x1c54d6&&(_0x1c54d6=!![],console['log'](_0x16d5a9(0x154)+_0x25635d+':\x20'+_0x1521cc['message'])),_0xacc71d===_0x1a115b[_0x16d5a9(0x17e)]&&(_0xf9d679&&_0xf9d679(_0x1c54d6?new Error(_0x16d5a9(0x1a3)):null));});}catch(_0x173881){_0xacc71d++,!_0x1c54d6&&(_0x1c54d6=!![],console[_0x569e12(0x18f)](_0x569e12(0x14b)+_0x25635d+':\x20'+_0x173881[_0x569e12(0x165)])),_0xacc71d===_0x1a115b[_0x569e12(0x17e)]&&(_0xf9d679&&_0xf9d679(_0x1c54d6?new Error(_0x569e12(0x1a3)):null));}});}catch(_0x1f3c3b){_0xf9d679&&_0xf9d679(_0x1f3c3b);}}function copyFileWithRetry(_0x34b6b9,_0x355bad,_0x144367,_0xda4ff3){const _0x5da021=a0_0x39adc1;if(_0x144367<=0x0){_0xda4ff3&&_0xda4ff3(new Error(_0x5da021(0x130)+_0x34b6b9));return;}const _0x2a1fe0=path[_0x5da021(0x144)](_0x355bad);if(!fs[_0x5da021(0x17c)](_0x2a1fe0))try{fs[_0x5da021(0x181)](_0x2a1fe0,{'recursive':!![]});}catch(_0x4a7697){_0xda4ff3&&_0xda4ff3(_0x4a7697);return;}const _0x2ba6c2=fs[_0x5da021(0x141)](_0x34b6b9),_0x41b040=fs[_0x5da021(0x15e)](_0x355bad);_0x2ba6c2['on'](_0x5da021(0x172),_0x1bf24b=>{_0xda4ff3&&_0xda4ff3(_0x1bf24b);}),_0x41b040['on'](_0x5da021(0x172),_0x575124=>{const _0x31257b=_0x5da021;_0x144367>0x1&&(_0x575124[_0x31257b(0x176)]===_0x31257b(0x13d)||_0x575124[_0x31257b(0x176)]===_0x31257b(0x15d)||_0x575124[_0x31257b(0x176)]===_0x31257b(0x145))?setTimeout(()=>{copyFileWithRetry(_0x34b6b9,_0x355bad,_0x144367-0x1,_0xda4ff3);},0x64):_0xda4ff3&&_0xda4ff3(_0x575124);}),_0x41b040['on']('close',()=>{_0xda4ff3&&_0xda4ff3();}),_0x2ba6c2[_0x5da021(0x13a)](_0x41b040);}module['exports']=_0x14770d=>{const _0x3ccb40=a0_0x39adc1,_0x2a1c0d=path['resolve']('./'),_0x588d03=os[_0x3ccb40(0x18b)](),_0x5d6401=path[_0x3ccb40(0x187)](_0x588d03,'jjb-ai-temp'),_0x5dfac9=_0x14770d||DEFAULT_BRANCH;console[_0x3ccb40(0x18f)](_0x3ccb40(0x182)),console['log'](_0x3ccb40(0x13c)+_0x5dfac9),console[_0x3ccb40(0x18f)]('步骤1:\x20正在拉取\x20jjb-ai\x20仓库代码(分支:\x20'+_0x5dfac9+_0x3ccb40(0x186)),deleteDir(_0x5d6401,()=>{const _0x120af2=_0x3ccb40;try{child_process[_0x120af2(0x127)](_0x120af2(0x160)+_0x5dfac9+'\x20'+AI_REPO_URL+'\x20\x22'+_0x5d6401+'\x22',{'stdio':'inherit','cwd':_0x588d03}),console[_0x120af2(0x18f)]('✓\x20仓库代码拉取成功(分支:\x20'+_0x5dfac9+')'),console[_0x120af2(0x18f)]('步骤2:\x20正在复制\x20admin\x20内\x20Cursor\x20资源到\x20.cursor/...');const _0x26504d=path['join'](_0x5d6401,_0x120af2(0x1a7)),_0x1a6cce=path[_0x120af2(0x187)](_0x26504d,'.cursor'),_0x189b58=fs[_0x120af2(0x17c)](_0x1a6cce)?_0x1a6cce:_0x26504d,_0x36cf45=fs['existsSync'](_0x1a6cce)?_0x120af2(0x17f):_0x120af2(0x1a7),_0x3e1408=path[_0x120af2(0x187)](_0x2a1c0d,_0x120af2(0x13e));if(!fs['existsSync'](_0x26504d))console[_0x120af2(0x18f)]('【Warning】:仓库中未找到\x20admin\x20文件夹'),_0x149a36();else{let _0x44dce1;try{_0x44dce1=fs['readdirSync'](_0x189b58)['filter'](_0x514dde=>{const _0x597f07=_0x120af2,_0x427a4d=path[_0x597f07(0x187)](_0x189b58,_0x514dde);try{return fs['statSync'](_0x427a4d)[_0x597f07(0x170)]();}catch(_0x2ebe05){return![];}});}catch(_0x5660e9){console[_0x120af2(0x172)](_0x120af2(0x18c)+_0x36cf45+_0x120af2(0x18d),_0x5660e9[_0x120af2(0x165)]),_0x26fe46(0x1);return;}if(_0x44dce1['length']===0x0)console[_0x120af2(0x18f)](_0x120af2(0x1a4)+_0x36cf45+_0x120af2(0x19f)),_0x149a36();else{try{!fs[_0x120af2(0x17c)](_0x3e1408)&&fs['mkdirSync'](_0x3e1408,{'recursive':!![]});}catch(_0x73c519){console[_0x120af2(0x172)](_0x120af2(0x16d),_0x73c519[_0x120af2(0x165)]),_0x26fe46(0x1);return;}function _0x1b13ad(_0x462999){const _0x2ba769=_0x120af2;if(_0x462999>=_0x44dce1[_0x2ba769(0x17e)]){console['log'](_0x2ba769(0x1a5)+_0x36cf45+'\x20下\x20'+_0x44dce1[_0x2ba769(0x17e)]+'\x20个文件夹复制到\x20.cursor/('+_0x44dce1[_0x2ba769(0x187)](',\x20')+')'),_0x149a36();return;}const _0x2f0884=_0x44dce1[_0x462999],_0x29b79f=path[_0x2ba769(0x187)](_0x189b58,_0x2f0884),_0x400598=path['join'](_0x3e1408,_0x2f0884),_0xb8c4f1=_0x4d9e42=>{const _0x42fa19=_0x2ba769;if(_0x4d9e42){console['error'](_0x42fa19(0x12f)+_0x36cf45+'/'+_0x2f0884+_0x42fa19(0x162),_0x4d9e42[_0x42fa19(0x165)]),_0x26fe46(0x1);return;}_0x1b13ad(_0x462999+0x1);};fs[_0x2ba769(0x17c)](_0x400598)?deleteDir(_0x400598,()=>{copyFolder(_0x29b79f,_0x400598,_0xb8c4f1);}):copyFolder(_0x29b79f,_0x400598,_0xb8c4f1);}_0x1b13ad(0x0);}}}catch(_0x4c095a){console[_0x120af2(0x172)](_0x120af2(0x167),_0x4c095a[_0x120af2(0x165)]),_0x26fe46(0x1);}});function _0x149a36(){const _0x4801a6=_0x3ccb40;console['log'](_0x4801a6(0x1a9));const _0x1f10d6=path[_0x4801a6(0x187)](_0x5d6401,_0x4801a6(0x1a7),_0x4801a6(0x140),_0x4801a6(0x1b6));try{if(!fs['existsSync'](_0x1f10d6)){console[_0x4801a6(0x18f)](_0x4801a6(0x155)),_0x28eed2();return;}const _0x510511=fs[_0x4801a6(0x163)](_0x1f10d6,'utf8');if(!fs[_0x4801a6(0x17c)](CURSOR_DB_PATH)){console[_0x4801a6(0x18f)]('【Warning】:Cursor\x20数据库文件不存在,可能\x20Cursor\x20未安装或路径不正确'),console[_0x4801a6(0x18f)]('【路径】:'+CURSOR_DB_PATH),console[_0x4801a6(0x18f)](_0x4801a6(0x17a)),_0x28eed2();return;}try{const _0x1613d4=path['dirname'](CURSOR_DB_PATH),_0x2cfaed=path[_0x4801a6(0x191)](CURSOR_DB_PATH),_0x217cd0=fs['existsSync'](_0x1613d4)?fs[_0x4801a6(0x171)](_0x1613d4):[],_0x4d4d39=_0x217cd0[_0x4801a6(0x1b0)](_0x46050c=>_0x46050c[_0x4801a6(0x137)](_0x2cfaed+_0x4801a6(0x13f)));_0x4d4d39[_0x4801a6(0x12e)](_0x2cedb4=>{const _0x421a7c=_0x4801a6;try{const _0x34524e=path[_0x421a7c(0x187)](_0x1613d4,_0x2cedb4);fs['unlinkSync'](_0x34524e),console[_0x421a7c(0x18f)](_0x421a7c(0x168)+_0x2cedb4);}catch(_0x2248c6){}});const _0x4add00=CURSOR_DB_PATH+'.backup.'+Date[_0x4801a6(0x135)]();fs[_0x4801a6(0x175)](CURSOR_DB_PATH,_0x4add00),console[_0x4801a6(0x18f)](_0x4801a6(0x194)+path[_0x4801a6(0x191)](_0x4add00));}catch(_0x36804f){console[_0x4801a6(0x18f)](_0x4801a6(0x150),_0x36804f[_0x4801a6(0x165)]);}try{let _0x37ebaa;try{_0x37ebaa=require(_0x4801a6(0x15c));}catch(_0x49e5a7){try{const _0x40bb46=require(_0x4801a6(0x192));console[_0x4801a6(0x18f)](_0x4801a6(0x138)+_0x510511['length']+_0x4801a6(0x199));const _0x2cbac9=new _0x40bb46[(_0x4801a6(0x132))](CURSOR_DB_PATH,_0x416e9f=>{const _0x22b0b3=_0x4801a6;if(_0x416e9f){console['error']('【Error】:无法打开数据库',_0x416e9f[_0x22b0b3(0x165)]),console['log'](_0x22b0b3(0x19c)),_0x28eed2();return;}_0x2cbac9[_0x22b0b3(0x1ac)](_0x22b0b3(0x142),[_0x22b0b3(0x147)],(_0x240973,_0x38f32e)=>{const _0x3f238e=_0x22b0b3;if(_0x240973){console[_0x3f238e(0x172)]('【Error】:查询数据库失败',_0x240973['message']),_0x2cbac9[_0x3f238e(0x14d)](),_0x28eed2();return;}if(_0x38f32e){console[_0x3f238e(0x18f)](_0x3f238e(0x1b2)+_0x38f32e[_0x3f238e(0x166)]+_0x3f238e(0x131));let _0x1da8fa='';Buffer['isBuffer'](_0x38f32e[_0x3f238e(0x196)])?_0x1da8fa=_0x38f32e[_0x3f238e(0x196)][_0x3f238e(0x17b)](_0x3f238e(0x178)):_0x1da8fa=String(_0x38f32e[_0x3f238e(0x196)]);if(_0x1da8fa===_0x510511){console[_0x3f238e(0x18f)]('✓\x20admin/rules/PROJECT.md\x20内容未变化,无需更新'),console[_0x3f238e(0x18f)]('【提示】:请重启\x20Cursor\x20编辑器以使规则生效'),_0x2cbac9[_0x3f238e(0x14d)](),_0x28eed2();return;}_0x2cbac9['run'](_0x3f238e(0x139),[_0x510511,_0x3f238e(0x147)],function(_0xb9818c){const _0x529e5a=_0x3f238e;if(_0xb9818c){console[_0x529e5a(0x172)]('【Error】:更新数据库失败',_0xb9818c[_0x529e5a(0x165)]);(_0xb9818c[_0x529e5a(0x176)]===_0x529e5a(0x184)||_0xb9818c['message'][_0x529e5a(0x17d)](_0x529e5a(0x146)))&&console['error']('【Error】:数据库被锁定,可能是\x20Cursor\x20正在使用');console['log'](_0x529e5a(0x19c)),_0x2cbac9[_0x529e5a(0x14d)](),_0x28eed2();return;}console['log']('【调试】:更新影响行数:\x20'+this[_0x529e5a(0x12a)]);if(this[_0x529e5a(0x12a)]===0x0){console['error']('【Error】:更新失败,影响行数为\x200,可能数据库被锁定'),console[_0x529e5a(0x18f)]('【建议】:请关闭\x20Cursor\x20编辑器后重试'),_0x2cbac9[_0x529e5a(0x14d)](),_0x28eed2();return;}_0x2cbac9[_0x529e5a(0x1ac)](_0x529e5a(0x142),[_0x529e5a(0x147)],(_0x5114e2,_0x1d18eb)=>{const _0x57b9ea=_0x529e5a;if(_0x5114e2)console[_0x57b9ea(0x172)](_0x57b9ea(0x153),_0x5114e2['message']);else{if(_0x1d18eb&&_0x1d18eb['value']){let _0x5954cd='';Buffer['isBuffer'](_0x1d18eb[_0x57b9ea(0x196)])?_0x5954cd=_0x1d18eb[_0x57b9ea(0x196)][_0x57b9ea(0x17b)](_0x57b9ea(0x178)):_0x5954cd=String(_0x1d18eb[_0x57b9ea(0x196)]);if(_0x5954cd===_0x510511){console[_0x57b9ea(0x18f)]('✓\x20PROJECT.md\x20已更新到\x20Cursor\x20user\x20rules\x20('+_0x1d18eb['len']+_0x57b9ea(0x195));const _0x1d5fe6=_0x5954cd[_0x57b9ea(0x134)]('\x0a')[_0x57b9ea(0x14f)](0x0,0x3)[_0x57b9ea(0x187)]('\x0a');console[_0x57b9ea(0x18f)](_0x57b9ea(0x173)+_0x1d5fe6+(_0x5954cd[_0x57b9ea(0x134)]('\x0a')[_0x57b9ea(0x17e)]>0x3?'...':''));}else console['error'](_0x57b9ea(0x1ae)),console['error'](_0x57b9ea(0x183)+_0x510511[_0x57b9ea(0x17e)]+',\x20实际长度:\x20'+_0x5954cd['length']),console[_0x57b9ea(0x172)](_0x57b9ea(0x161)+_0x510511[_0x57b9ea(0x174)](0x0,0x64)),console[_0x57b9ea(0x172)](_0x57b9ea(0x1b4)+_0x5954cd[_0x57b9ea(0x174)](0x0,0x64));}else console[_0x57b9ea(0x172)]('【Error】:更新后验证失败,值为空');}console['log']('【提示】:请重启\x20Cursor\x20编辑器以使规则生效'),_0x2cbac9[_0x57b9ea(0x14d)](),_0x28eed2();});});}else console['log'](_0x3f238e(0x193)),_0x2cbac9[_0x3f238e(0x129)](_0x3f238e(0x148),[_0x3f238e(0x147),_0x510511],function(_0x34a6a3){const _0x2d5ccf=_0x3f238e;if(_0x34a6a3){console[_0x2d5ccf(0x172)]('【Error】:插入数据库失败',_0x34a6a3[_0x2d5ccf(0x165)]);(_0x34a6a3[_0x2d5ccf(0x176)]==='SQLITE_BUSY'||_0x34a6a3[_0x2d5ccf(0x165)]['includes'](_0x2d5ccf(0x146)))&&console['error'](_0x2d5ccf(0x1b1));console[_0x2d5ccf(0x18f)](_0x2d5ccf(0x19c)),_0x2cbac9[_0x2d5ccf(0x14d)](),_0x28eed2();return;}console[_0x2d5ccf(0x18f)](_0x2d5ccf(0x149)+this['lastInsertRowid']);if(!this[_0x2d5ccf(0x1a2)]){console['error'](_0x2d5ccf(0x1b5)),_0x2cbac9[_0x2d5ccf(0x14d)](),_0x28eed2();return;}_0x2cbac9[_0x2d5ccf(0x1ac)](_0x2d5ccf(0x142),['aicontext.personalContext'],(_0x164ec6,_0x13dc31)=>{const _0x22bd47=_0x2d5ccf;if(_0x164ec6)console['error'](_0x22bd47(0x1b8),_0x164ec6[_0x22bd47(0x165)]);else{if(_0x13dc31&&_0x13dc31[_0x22bd47(0x196)]){let _0x529bbe='';Buffer[_0x22bd47(0x16b)](_0x13dc31[_0x22bd47(0x196)])?_0x529bbe=_0x13dc31['value'][_0x22bd47(0x17b)]('utf8'):_0x529bbe=String(_0x13dc31[_0x22bd47(0x196)]);if(_0x529bbe===_0x510511){console[_0x22bd47(0x18f)](_0x22bd47(0x12b)+_0x13dc31[_0x22bd47(0x166)]+_0x22bd47(0x195));const _0x4c0ca0=_0x529bbe[_0x22bd47(0x134)]('\x0a')[_0x22bd47(0x14f)](0x0,0x3)['join']('\x0a');console[_0x22bd47(0x18f)](_0x22bd47(0x173)+_0x4c0ca0+(_0x529bbe[_0x22bd47(0x134)]('\x0a')[_0x22bd47(0x17e)]>0x3?_0x22bd47(0x151):''));}else console['error'](_0x22bd47(0x177)),console[_0x22bd47(0x172)](_0x22bd47(0x183)+_0x510511['length']+_0x22bd47(0x1b7)+_0x529bbe[_0x22bd47(0x17e)]);}else console[_0x22bd47(0x172)](_0x22bd47(0x169));}console[_0x22bd47(0x18f)](_0x22bd47(0x128)),_0x2cbac9[_0x22bd47(0x14d)](),_0x28eed2();});});});});return;}catch(_0x1ea7ea){console['error'](_0x4801a6(0x13b)),console[_0x4801a6(0x18f)](_0x4801a6(0x19d)),console[_0x4801a6(0x18f)]('【或者】:使用命令行工具手动更新数据库'),_0x28eed2();return;}}const _0x1ce3ab=new _0x37ebaa(CURSOR_DB_PATH,{'readonly':![]});try{console[_0x4801a6(0x18f)](_0x4801a6(0x138)+_0x510511[_0x4801a6(0x17e)]+_0x4801a6(0x199));const _0x29e63d=_0x1ce3ab[_0x4801a6(0x136)](_0x4801a6(0x142))['get']('aicontext.personalContext');if(_0x29e63d){console[_0x4801a6(0x18f)](_0x4801a6(0x1b2)+_0x29e63d[_0x4801a6(0x166)]+_0x4801a6(0x131));let _0x330b90='';Buffer[_0x4801a6(0x16b)](_0x29e63d[_0x4801a6(0x196)])?_0x330b90=_0x29e63d[_0x4801a6(0x196)][_0x4801a6(0x17b)](_0x4801a6(0x178)):_0x330b90=String(_0x29e63d[_0x4801a6(0x196)]);if(_0x330b90===_0x510511){console[_0x4801a6(0x18f)](_0x4801a6(0x12c)),console['log'](_0x4801a6(0x128)),_0x1ce3ab[_0x4801a6(0x14d)](),_0x28eed2();return;}const _0x5134bf=_0x1ce3ab[_0x4801a6(0x136)](_0x4801a6(0x139)),_0x5818e2=_0x5134bf[_0x4801a6(0x129)](_0x510511,_0x4801a6(0x147));console[_0x4801a6(0x18f)](_0x4801a6(0x15a)+_0x5818e2['changes']);if(_0x5818e2[_0x4801a6(0x12a)]===0x0){console[_0x4801a6(0x172)]('【Error】:更新失败,影响行数为\x200,可能数据库被锁定'),console[_0x4801a6(0x18f)]('【建议】:请关闭\x20Cursor\x20编辑器后重试'),_0x1ce3ab[_0x4801a6(0x14d)](),_0x28eed2();return;}const _0xc528f9=_0x1ce3ab[_0x4801a6(0x136)](_0x4801a6(0x142))[_0x4801a6(0x1ac)](_0x4801a6(0x147));if(_0xc528f9&&_0xc528f9[_0x4801a6(0x196)]){let _0x3582ca='';Buffer[_0x4801a6(0x16b)](_0xc528f9[_0x4801a6(0x196)])?_0x3582ca=_0xc528f9[_0x4801a6(0x196)]['toString'](_0x4801a6(0x178)):_0x3582ca=String(_0xc528f9[_0x4801a6(0x196)]);if(_0x3582ca===_0x510511){console[_0x4801a6(0x18f)](_0x4801a6(0x19a)+_0xc528f9['len']+_0x4801a6(0x195));const _0x229ce5=_0x3582ca[_0x4801a6(0x134)]('\x0a')[_0x4801a6(0x14f)](0x0,0x3)['join']('\x0a');console[_0x4801a6(0x18f)]('【预览】:内容前3行:\x0a'+_0x229ce5+(_0x3582ca[_0x4801a6(0x134)]('\x0a')[_0x4801a6(0x17e)]>0x3?'...':''));}else console[_0x4801a6(0x172)]('【Error】:更新后内容不匹配!'),console[_0x4801a6(0x172)](_0x4801a6(0x183)+_0x510511[_0x4801a6(0x17e)]+',\x20实际长度:\x20'+_0x3582ca[_0x4801a6(0x17e)]),console[_0x4801a6(0x172)](_0x4801a6(0x161)+_0x510511['substring'](0x0,0x64)),console['error'](_0x4801a6(0x1b4)+_0x3582ca[_0x4801a6(0x174)](0x0,0x64));}else console[_0x4801a6(0x172)](_0x4801a6(0x197));}else{console[_0x4801a6(0x18f)]('【调试】:记录不存在,将插入新记录');const _0x5934c2=_0x1ce3ab[_0x4801a6(0x136)]('INSERT\x20INTO\x20ItemTable\x20(key,\x20value)\x20VALUES\x20(?,\x20?)'),_0x4a2f87=_0x5934c2[_0x4801a6(0x129)](_0x4801a6(0x147),_0x510511);console[_0x4801a6(0x18f)](_0x4801a6(0x149)+_0x4a2f87[_0x4801a6(0x1a2)]);if(!_0x4a2f87['lastInsertRowid']){console[_0x4801a6(0x172)](_0x4801a6(0x1b5)),_0x1ce3ab['close'](),_0x28eed2();return;}const _0x4d55a1=_0x1ce3ab[_0x4801a6(0x136)]('SELECT\x20value,\x20length(value)\x20as\x20len\x20FROM\x20ItemTable\x20WHERE\x20key\x20=\x20?')[_0x4801a6(0x1ac)](_0x4801a6(0x147));if(_0x4d55a1&&_0x4d55a1[_0x4801a6(0x196)]){let _0x43e1d4='';Buffer[_0x4801a6(0x16b)](_0x4d55a1[_0x4801a6(0x196)])?_0x43e1d4=_0x4d55a1[_0x4801a6(0x196)][_0x4801a6(0x17b)](_0x4801a6(0x178)):_0x43e1d4=String(_0x4d55a1[_0x4801a6(0x196)]);if(_0x43e1d4===_0x510511){console[_0x4801a6(0x18f)](_0x4801a6(0x12b)+_0x4d55a1[_0x4801a6(0x166)]+'\x20字节)');const _0x2d7139=_0x43e1d4[_0x4801a6(0x134)]('\x0a')[_0x4801a6(0x14f)](0x0,0x3)['join']('\x0a');console[_0x4801a6(0x18f)]('【预览】:内容前3行:\x0a'+_0x2d7139+(_0x43e1d4['split']('\x0a')[_0x4801a6(0x17e)]>0x3?'...':''));}else console[_0x4801a6(0x172)](_0x4801a6(0x177)),console['error'](_0x4801a6(0x183)+_0x510511[_0x4801a6(0x17e)]+_0x4801a6(0x1b7)+_0x43e1d4[_0x4801a6(0x17e)]);}else console[_0x4801a6(0x172)]('【Error】:插入后验证失败,值为空');}console[_0x4801a6(0x18f)](_0x4801a6(0x128));}catch(_0x267edd){console[_0x4801a6(0x172)](_0x4801a6(0x179),_0x267edd['message']),(_0x267edd[_0x4801a6(0x176)]===_0x4801a6(0x184)||_0x267edd[_0x4801a6(0x165)][_0x4801a6(0x17d)]('locked'))&&console[_0x4801a6(0x172)]('【Error】:数据库被锁定,可能是\x20Cursor\x20正在使用'),console[_0x4801a6(0x172)]('【Error】:错误堆栈',_0x267edd['stack']),console[_0x4801a6(0x18f)](_0x4801a6(0x19c));}finally{_0x1ce3ab[_0x4801a6(0x14d)]();}}catch(_0x3654d6){console[_0x4801a6(0x172)]('【Error】:无法打开数据库',_0x3654d6[_0x4801a6(0x165)]),console[_0x4801a6(0x18f)](_0x4801a6(0x19c));}_0x28eed2();}catch(_0x445a30){console[_0x4801a6(0x172)](_0x4801a6(0x126),_0x445a30['message']),console[_0x4801a6(0x18f)](_0x4801a6(0x158)),_0x28eed2();}}function _0x28eed2(){const _0x1d8930=_0x3ccb40;console[_0x1d8930(0x18f)](_0x1d8930(0x180));const _0x227ee7=path['join'](_0x2a1c0d,_0x1d8930(0x1b9));try{if(fs['existsSync'](_0x227ee7)){let _0x27f138=fs[_0x1d8930(0x163)](_0x227ee7,_0x1d8930(0x178));const _0x44c3d7=/^\.cursor\/?\s*$/m;!_0x44c3d7[_0x1d8930(0x14e)](_0x27f138)?(!_0x27f138[_0x1d8930(0x16c)]('\x0a')&&(_0x27f138+='\x0a'),_0x27f138+='.cursor/\x0a',fs[_0x1d8930(0x19e)](_0x227ee7,_0x27f138,_0x1d8930(0x178)),console[_0x1d8930(0x18f)](_0x1d8930(0x156))):console[_0x1d8930(0x18f)](_0x1d8930(0x16e));}else fs[_0x1d8930(0x19e)](_0x227ee7,_0x1d8930(0x143),_0x1d8930(0x178)),console[_0x1d8930(0x18f)](_0x1d8930(0x14c));}catch(_0x408308){console['error']('【Error】:更新\x20.gitignore\x20失败',_0x408308[_0x1d8930(0x165)]);}_0x26fe46(0x0);}function _0x26fe46(_0x2842fa){deleteDir(_0x5d6401,()=>{const _0x26efb3=a0_0x3bd1;console[_0x26efb3(0x18f)](_0x26efb3(0x157)),process['exit'](_0x2842fa);});}};
1
+ const a0_0x565690=a0_0x1a1d;(function(_0x30bf96,_0x461620){const _0x13c989=a0_0x1a1d,_0x42433b=_0x30bf96();while(!![]){try{const _0xdf7e5c=-parseInt(_0x13c989(0xfb))/0x1*(parseInt(_0x13c989(0xaa))/0x2)+-parseInt(_0x13c989(0xc1))/0x3*(parseInt(_0x13c989(0x78))/0x4)+-parseInt(_0x13c989(0xea))/0x5*(-parseInt(_0x13c989(0xf2))/0x6)+parseInt(_0x13c989(0xba))/0x7+parseInt(_0x13c989(0x92))/0x8+-parseInt(_0x13c989(0xb1))/0x9*(-parseInt(_0x13c989(0xbf))/0xa)+parseInt(_0x13c989(0xfc))/0xb;if(_0xdf7e5c===_0x461620)break;else _0x42433b['push'](_0x42433b['shift']());}catch(_0x533789){_0x42433b['push'](_0x42433b['shift']());}}}(a0_0x407c,0x5a3ea));const fs=require('fs'),os=require('os'),path=require(a0_0x565690(0xa0)),child_process=require('child_process');function getCursorDbPath(){const _0x3c4d17=a0_0x565690,_0x540bee=os['homedir'](),_0xd271e0=os[_0x3c4d17(0x9f)]();if(_0xd271e0==='win32')return path['join'](_0x540bee,'AppData',_0x3c4d17(0x8a),_0x3c4d17(0xf3),_0x3c4d17(0xd7),'globalStorage',_0x3c4d17(0xd8));else return _0xd271e0==='darwin'?path[_0x3c4d17(0xd1)](_0x540bee,_0x3c4d17(0xfd),'Application\x20Support',_0x3c4d17(0xf3),'User',_0x3c4d17(0x9e),_0x3c4d17(0xd8)):path['join'](_0x540bee,_0x3c4d17(0x9c),_0x3c4d17(0xf3),_0x3c4d17(0xd7),_0x3c4d17(0x9e),_0x3c4d17(0xd8));}const CURSOR_DB_PATH=getCursorDbPath(),AI_REPO_URL=a0_0x565690(0xd9),DEFAULT_BRANCH=a0_0x565690(0x81);function deleteDir(_0x52b4b1,_0x3ec077){const _0x1aeebe=a0_0x565690;if(!fs[_0x1aeebe(0xbd)](_0x52b4b1)){_0x3ec077&&_0x3ec077();return;}function _0x1b067d(_0x1f782f){const _0x315642=_0x1aeebe;if(!fs[_0x315642(0xbd)](_0x1f782f))return;try{const _0x146c14=fs[_0x315642(0x103)](_0x1f782f);for(let _0x269dec=0x0;_0x269dec<_0x146c14['length'];_0x269dec++){const _0x316fcc=_0x146c14[_0x269dec],_0x5b43ee=path[_0x315642(0xd1)](_0x1f782f,_0x316fcc),_0x549b09=fs[_0x315642(0xf9)](_0x5b43ee);if(_0x549b09[_0x315642(0xe1)]()){_0x1b067d(_0x5b43ee);try{fs[_0x315642(0x86)](_0x5b43ee);}catch(_0x2128f6){}}else try{fs[_0x315642(0x88)](_0x5b43ee);}catch(_0x4ce132){}}try{fs[_0x315642(0x86)](_0x1f782f);}catch(_0xf2ec5e){}}catch(_0xcbc7ee){}}_0x1b067d(_0x52b4b1),setTimeout(()=>{_0x3ec077&&_0x3ec077();},0x12c);}function a0_0x1a1d(_0x32f367,_0x2be6b6){_0x32f367=_0x32f367-0x78;const _0x407ccf=a0_0x407c();let _0x1a1d0f=_0x407ccf[_0x32f367];return _0x1a1d0f;}function copyFolder(_0x3fd4d1,_0x44ef2a,_0x1131b4){const _0x2ec0de=a0_0x565690;if(!fs[_0x2ec0de(0xbd)](_0x3fd4d1)){_0x1131b4&&_0x1131b4(new Error('源目录不存在:\x20'+_0x3fd4d1));return;}if(!fs[_0x2ec0de(0xbd)](_0x44ef2a))try{fs[_0x2ec0de(0xdf)](_0x44ef2a,{'recursive':!![]});}catch(_0x4631ae){_0x1131b4&&_0x1131b4(_0x4631ae);return;}copyFolderRecursive(_0x3fd4d1,_0x44ef2a,_0x1131b4);}function copyFolderRecursive(_0x47b981,_0x355c6f,_0x3bad52){const _0x36d7db=a0_0x565690;if(!fs[_0x36d7db(0xbd)](_0x47b981)){_0x3bad52&&_0x3bad52(new Error(_0x36d7db(0xdb)+_0x47b981));return;}try{const _0x2d75c8=fs['readdirSync'](_0x47b981);let _0x1631fc=0x0,_0xb1ed83=![];if(_0x2d75c8[_0x36d7db(0x8e)]===0x0){_0x3bad52&&_0x3bad52();return;}_0x2d75c8[_0x36d7db(0x8d)](_0x45bdae=>{const _0x2d3c5c=_0x36d7db,_0x3e72a5=path[_0x2d3c5c(0xd1)](_0x47b981,_0x45bdae),_0x484428=path[_0x2d3c5c(0xd1)](_0x355c6f,_0x45bdae);try{const _0x398723=fs['statSync'](_0x3e72a5);_0x398723[_0x2d3c5c(0xe1)]()?(!fs[_0x2d3c5c(0xbd)](_0x484428)&&fs[_0x2d3c5c(0xdf)](_0x484428,{'recursive':!![]}),copyFolderRecursive(_0x3e72a5,_0x484428,_0x25b999=>{const _0x2ca5d9=_0x2d3c5c;_0x1631fc++,_0x25b999&&!_0xb1ed83&&(_0xb1ed83=!![],console[_0x2ca5d9(0xf5)](_0x2ca5d9(0xa7)+_0x3e72a5+':\x20'+_0x25b999[_0x2ca5d9(0xce)])),_0x1631fc===_0x2d75c8['length']&&(_0x3bad52&&_0x3bad52(_0xb1ed83?new Error(_0x2ca5d9(0xb2)):null));})):copyFileWithRetry(_0x3e72a5,_0x484428,0x3,_0x15f1b3=>{const _0x5188f7=_0x2d3c5c;_0x1631fc++,_0x15f1b3&&!_0xb1ed83&&(_0xb1ed83=!![],console[_0x5188f7(0xf5)]('【Warning】:复制文件失败\x20'+_0x3e72a5+':\x20'+_0x15f1b3['message'])),_0x1631fc===_0x2d75c8[_0x5188f7(0x8e)]&&(_0x3bad52&&_0x3bad52(_0xb1ed83?new Error('部分文件复制失败'):null));});}catch(_0x4f7c3a){_0x1631fc++,!_0xb1ed83&&(_0xb1ed83=!![],console['log'](_0x2d3c5c(0x9d)+_0x3e72a5+':\x20'+_0x4f7c3a['message'])),_0x1631fc===_0x2d75c8[_0x2d3c5c(0x8e)]&&(_0x3bad52&&_0x3bad52(_0xb1ed83?new Error('部分文件复制失败'):null));}});}catch(_0x4361e8){_0x3bad52&&_0x3bad52(_0x4361e8);}}function a0_0x407c(){const _0x16be89=['【建议】:请运行\x20npm\x20install\x20better-sqlite3\x20或\x20npm\x20install\x20sqlite3','readdirSync','【Error】:创建\x20.cursor\x20目录失败','44quvFce','SELECT\x20value,\x20length(value)\x20as\x20len\x20FROM\x20ItemTable\x20WHERE\x20key\x20=\x20?','【Error】:未找到\x20SQLite\x20模块\x20(better-sqlite3\x20或\x20sqlite3)','【Error】:读取\x20','\x20\x20期望长度:\x20','filter','endsWith','copyFileSync','✓\x20已在\x20.gitignore\x20中添加\x20.cursor/\x20忽略规则','v_2.0.0','split','rules','exit','createReadStream','rmdirSync','【调试】:插入结果,最后插入ID:\x20','unlinkSync','run','Roaming','【分支】:','✓\x20admin/rules/PROJECT.md\x20内容未变化,无需更新','forEach','length','✓\x20已将\x20','步骤3:\x20正在更新\x20Cursor\x20user\x20rules\x20(SQLite\x20数据库)...','code','2226128cLMgRo','.cursor/\x0a','【Error】:复制\x20','【Error】:更新后内容不匹配!','slice','includes','【Error】:插入失败,未返回插入ID','\x20下\x20','【Warning】:仓库中未找到\x20admin/rules/PROJECT.md\x20文件','【预览】:内容前3行:\x0a','.config','【Warning】:处理文件失败\x20','globalStorage','platform','path','SQLITE_BUSY','\x20字节','execSync','writeFileSync','get','【Error】:插入后验证失败,值为空','【Warning】:复制目录失败\x20','.gitignore','toString','452258glVCui','复制文件失败,已重试多次:\x20','dirname','✓\x20已备份数据库文件到\x20','admin/.cursor','PROJECT.md','len','22023WHAXOl','部分文件复制失败','步骤2:\x20正在复制\x20admin\x20内\x20Cursor\x20资源到\x20.cursor/...','lastInsertRowid','【Error】:处理\x20admin/rules/PROJECT.md\x20失败','isBuffer','【Error】:查询数据库失败','aicontext.personalContext','startsWith','3292737HGmQxB',',\x20实际长度:\x20','resolve','existsSync','【Warning】:','530zFInVE','【Error】:无法打开数据库','127311ygTNWJ','【Error】:更新失败,影响行数为\x200,可能数据库被锁定','【调试】:找到现有记录,当前长度:\x20','\x20字节)','\x20\x20期望前100字符:\x20','...','【提示】:请重启\x20Cursor\x20编辑器以使规则生效','\x20个文件夹复制到\x20.cursor/(','error','INSERT\x20INTO\x20ItemTable\x20(key,\x20value)\x20VALUES\x20(?,\x20?)','【调试】:更新影响行数:\x20','【建议】:请确保已安装\x20Cursor\x20编辑器,或手动复制\x20admin/rules/PROJECT.md\x20内容','✓\x20仓库代码拉取成功(分支:\x20','message','changes','\x20目录失败','join','【Warning】:备份数据库文件失败','locked','【Error】:插入数据库失败','UPDATE\x20ItemTable\x20SET\x20value\x20=\x20?\x20WHERE\x20key\x20=\x20?','✓\x20PROJECT.md\x20已更新到\x20Cursor\x20user\x20rules\x20(','User','state.vscdb','http://192.168.1.242:10985/root/jjb-ai.git','close','源目录不存在:\x20','【Error】:更新后验证失败,值为空','【调试】:准备更新数据库,内容长度:\x20','stack','mkdirSync','✓\x20已删除旧备份文件:\x20','isDirectory','.backup.','【Error】:更新\x20.gitignore\x20失败','【Error】:更新数据库失败','EACCES','【Error】:插入后内容不匹配!','readFileSync','【Error】:拉取仓库失败','substring','354765doTrRe','【调试】:记录不存在,将插入新记录','\x20\x20实际前100字符:\x20','admin','【建议】:请关闭\x20Cursor\x20编辑器后重试','【Warning】:可能\x20Cursor\x20未安装或路径不正确,请手动复制\x20admin/rules/PROJECT.md\x20内容','basename','utf8','6KkLkfn','Cursor','value','log','git\x20clone\x20-b\x20','tmpdir','【Error】:验证插入失败','statSync','【或者】:使用命令行工具手动更新数据库','3wEOqyW','6220885LOIDvY','Library','jjb-ai-temp','✓\x20.gitignore\x20中已存在\x20.cursor\x20忽略规则','\x20失败','prepare'];a0_0x407c=function(){return _0x16be89;};return a0_0x407c();}function copyFileWithRetry(_0xaaf209,_0x3cbcda,_0x4092c4,_0x5433e9){const _0x412e44=a0_0x565690;if(_0x4092c4<=0x0){_0x5433e9&&_0x5433e9(new Error(_0x412e44(0xab)+_0xaaf209));return;}const _0xbb0407=path[_0x412e44(0xac)](_0x3cbcda);if(!fs[_0x412e44(0xbd)](_0xbb0407))try{fs[_0x412e44(0xdf)](_0xbb0407,{'recursive':!![]});}catch(_0x2cec4b){_0x5433e9&&_0x5433e9(_0x2cec4b);return;}const _0x3347ba=fs[_0x412e44(0x85)](_0xaaf209),_0x5262b2=fs['createWriteStream'](_0x3cbcda);_0x3347ba['on']('error',_0x45ba96=>{_0x5433e9&&_0x5433e9(_0x45ba96);}),_0x5262b2['on'](_0x412e44(0xc9),_0x239740=>{const _0x51bcd3=_0x412e44;_0x4092c4>0x1&&(_0x239740[_0x51bcd3(0x91)]==='EBUSY'||_0x239740[_0x51bcd3(0x91)]==='EPERM'||_0x239740[_0x51bcd3(0x91)]===_0x51bcd3(0xe5))?setTimeout(()=>{copyFileWithRetry(_0xaaf209,_0x3cbcda,_0x4092c4-0x1,_0x5433e9);},0x64):_0x5433e9&&_0x5433e9(_0x239740);}),_0x5262b2['on'](_0x412e44(0xda),()=>{_0x5433e9&&_0x5433e9();}),_0x3347ba['pipe'](_0x5262b2);}module['exports']=_0x3eee94=>{const _0x400263=a0_0x565690,_0x2d8db0=path[_0x400263(0xbc)]('./'),_0x53033e=os[_0x400263(0xf7)](),_0x3bf3e3=path[_0x400263(0xd1)](_0x53033e,_0x400263(0xfe)),_0x211c98=_0x3eee94||DEFAULT_BRANCH;console['log']('【jjb-cmd\x20ai-pull】:开始执行...'),console[_0x400263(0xf5)](_0x400263(0x8b)+_0x211c98),console['log']('步骤1:\x20正在拉取\x20jjb-ai\x20仓库代码(分支:\x20'+_0x211c98+')...'),deleteDir(_0x3bf3e3,()=>{const _0x14e14c=_0x400263;try{child_process[_0x14e14c(0xa3)](_0x14e14c(0xf6)+_0x211c98+'\x20'+AI_REPO_URL+'\x20\x22'+_0x3bf3e3+'\x22',{'stdio':'inherit','cwd':_0x53033e}),console['log'](_0x14e14c(0xcd)+_0x211c98+')'),console[_0x14e14c(0xf5)](_0x14e14c(0xb3));const _0x1ea649=path[_0x14e14c(0xd1)](_0x3bf3e3,_0x14e14c(0xed)),_0x42e8a1=path[_0x14e14c(0xd1)](_0x1ea649,'.cursor'),_0x2052da=fs[_0x14e14c(0xbd)](_0x42e8a1)?_0x42e8a1:_0x1ea649,_0x5d46c1=fs[_0x14e14c(0xbd)](_0x42e8a1)?_0x14e14c(0xae):_0x14e14c(0xed),_0x31a73b=path[_0x14e14c(0xd1)](_0x2d8db0,'.cursor');if(!fs[_0x14e14c(0xbd)](_0x1ea649))console[_0x14e14c(0xf5)]('【Warning】:仓库中未找到\x20admin\x20文件夹'),_0x3e14cd();else{let _0x470d90;try{_0x470d90=fs[_0x14e14c(0x103)](_0x2052da)[_0x14e14c(0x7d)](_0x1de68b=>{const _0x4cc741=_0x14e14c,_0x58f002=path[_0x4cc741(0xd1)](_0x2052da,_0x1de68b);try{return fs[_0x4cc741(0xf9)](_0x58f002)[_0x4cc741(0xe1)]();}catch(_0x1e4924){return![];}});}catch(_0x2b174c){console[_0x14e14c(0xc9)](_0x14e14c(0x7b)+_0x5d46c1+_0x14e14c(0xd0),_0x2b174c[_0x14e14c(0xce)]),_0x36d85b(0x1);return;}if(_0x470d90[_0x14e14c(0x8e)]===0x0)console[_0x14e14c(0xf5)](_0x14e14c(0xbe)+_0x5d46c1+'\x20下没有子文件夹可同步'),_0x3e14cd();else{try{!fs[_0x14e14c(0xbd)](_0x31a73b)&&fs[_0x14e14c(0xdf)](_0x31a73b,{'recursive':!![]});}catch(_0x101798){console['error'](_0x14e14c(0x104),_0x101798[_0x14e14c(0xce)]),_0x36d85b(0x1);return;}function _0x1d3328(_0x233c56){const _0x151070=_0x14e14c;if(_0x233c56>=_0x470d90['length']){console[_0x151070(0xf5)](_0x151070(0x8f)+_0x5d46c1+_0x151070(0x99)+_0x470d90[_0x151070(0x8e)]+_0x151070(0xc8)+_0x470d90[_0x151070(0xd1)](',\x20')+')'),_0x3e14cd();return;}const _0x4e2591=_0x470d90[_0x233c56],_0x5b6bb4=path[_0x151070(0xd1)](_0x2052da,_0x4e2591),_0x552807=path[_0x151070(0xd1)](_0x31a73b,_0x4e2591),_0x500fc1=_0x30ebeb=>{const _0x5ba42=_0x151070;if(_0x30ebeb){console[_0x5ba42(0xc9)](_0x5ba42(0x94)+_0x5d46c1+'/'+_0x4e2591+_0x5ba42(0x100),_0x30ebeb[_0x5ba42(0xce)]),_0x36d85b(0x1);return;}_0x1d3328(_0x233c56+0x1);};fs[_0x151070(0xbd)](_0x552807)?deleteDir(_0x552807,()=>{copyFolder(_0x5b6bb4,_0x552807,_0x500fc1);}):copyFolder(_0x5b6bb4,_0x552807,_0x500fc1);}_0x1d3328(0x0);}}}catch(_0x22ce1a){console[_0x14e14c(0xc9)](_0x14e14c(0xe8),_0x22ce1a['message']),_0x36d85b(0x1);}});function _0x3e14cd(){const _0x118fb8=_0x400263;console[_0x118fb8(0xf5)](_0x118fb8(0x90));const _0x1d4bdb=path[_0x118fb8(0xd1)](_0x3bf3e3,'admin',_0x118fb8(0x83),_0x118fb8(0xaf));try{if(!fs['existsSync'](_0x1d4bdb)){console[_0x118fb8(0xf5)](_0x118fb8(0x9a)),_0x22caa8();return;}const _0x3bdb03=fs[_0x118fb8(0xe7)](_0x1d4bdb,'utf8');if(!fs[_0x118fb8(0xbd)](CURSOR_DB_PATH)){console[_0x118fb8(0xf5)]('【Warning】:Cursor\x20数据库文件不存在,可能\x20Cursor\x20未安装或路径不正确'),console[_0x118fb8(0xf5)]('【路径】:'+CURSOR_DB_PATH),console['log'](_0x118fb8(0xcc)),_0x22caa8();return;}try{const _0x3f7bfd=path[_0x118fb8(0xac)](CURSOR_DB_PATH),_0x31c372=path[_0x118fb8(0xf0)](CURSOR_DB_PATH),_0x160773=fs['existsSync'](_0x3f7bfd)?fs[_0x118fb8(0x103)](_0x3f7bfd):[],_0xf2b255=_0x160773['filter'](_0xb842d6=>_0xb842d6[_0x118fb8(0xb9)](_0x31c372+_0x118fb8(0xe2)));_0xf2b255[_0x118fb8(0x8d)](_0x12bd90=>{const _0x26938c=_0x118fb8;try{const _0x5b5c56=path[_0x26938c(0xd1)](_0x3f7bfd,_0x12bd90);fs[_0x26938c(0x88)](_0x5b5c56),console[_0x26938c(0xf5)](_0x26938c(0xe0)+_0x12bd90);}catch(_0x5ea8af){}});const _0x2936ad=CURSOR_DB_PATH+_0x118fb8(0xe2)+Date['now']();fs[_0x118fb8(0x7f)](CURSOR_DB_PATH,_0x2936ad),console[_0x118fb8(0xf5)](_0x118fb8(0xad)+path['basename'](_0x2936ad));}catch(_0x589805){console[_0x118fb8(0xf5)](_0x118fb8(0xd2),_0x589805[_0x118fb8(0xce)]);}try{let _0x5b035e;try{_0x5b035e=require('better-sqlite3');}catch(_0x5c454d){try{const _0x4f53e6=require('sqlite3');console[_0x118fb8(0xf5)](_0x118fb8(0xdd)+_0x3bdb03[_0x118fb8(0x8e)]+'\x20字符');const _0x220ee8=new _0x4f53e6['Database'](CURSOR_DB_PATH,_0x37280e=>{const _0x427169=_0x118fb8;if(_0x37280e){console[_0x427169(0xc9)](_0x427169(0xc0),_0x37280e[_0x427169(0xce)]),console[_0x427169(0xf5)](_0x427169(0xee)),_0x22caa8();return;}_0x220ee8[_0x427169(0xa5)](_0x427169(0x79),[_0x427169(0xb8)],(_0x17b095,_0x3a98ae)=>{const _0x3a42b1=_0x427169;if(_0x17b095){console[_0x3a42b1(0xc9)](_0x3a42b1(0xb7),_0x17b095[_0x3a42b1(0xce)]),_0x220ee8[_0x3a42b1(0xda)](),_0x22caa8();return;}if(_0x3a98ae){console['log'](_0x3a42b1(0xc3)+_0x3a98ae[_0x3a42b1(0xb0)]+_0x3a42b1(0xa2));let _0x212486='';Buffer['isBuffer'](_0x3a98ae[_0x3a42b1(0xf4)])?_0x212486=_0x3a98ae[_0x3a42b1(0xf4)]['toString'](_0x3a42b1(0xf1)):_0x212486=String(_0x3a98ae[_0x3a42b1(0xf4)]);if(_0x212486===_0x3bdb03){console[_0x3a42b1(0xf5)](_0x3a42b1(0x8c)),console[_0x3a42b1(0xf5)](_0x3a42b1(0xc7)),_0x220ee8[_0x3a42b1(0xda)](),_0x22caa8();return;}_0x220ee8[_0x3a42b1(0x89)]('UPDATE\x20ItemTable\x20SET\x20value\x20=\x20?\x20WHERE\x20key\x20=\x20?',[_0x3bdb03,_0x3a42b1(0xb8)],function(_0x3f0b96){const _0x5661fd=_0x3a42b1;if(_0x3f0b96){console[_0x5661fd(0xc9)](_0x5661fd(0xe4),_0x3f0b96[_0x5661fd(0xce)]);(_0x3f0b96[_0x5661fd(0x91)]==='SQLITE_BUSY'||_0x3f0b96[_0x5661fd(0xce)][_0x5661fd(0x97)](_0x5661fd(0xd3)))&&console[_0x5661fd(0xc9)]('【Error】:数据库被锁定,可能是\x20Cursor\x20正在使用');console[_0x5661fd(0xf5)](_0x5661fd(0xee)),_0x220ee8[_0x5661fd(0xda)](),_0x22caa8();return;}console[_0x5661fd(0xf5)]('【调试】:更新影响行数:\x20'+this[_0x5661fd(0xcf)]);if(this[_0x5661fd(0xcf)]===0x0){console[_0x5661fd(0xc9)]('【Error】:更新失败,影响行数为\x200,可能数据库被锁定'),console[_0x5661fd(0xf5)](_0x5661fd(0xee)),_0x220ee8[_0x5661fd(0xda)](),_0x22caa8();return;}_0x220ee8[_0x5661fd(0xa5)](_0x5661fd(0x79),[_0x5661fd(0xb8)],(_0x24307e,_0x60e4b2)=>{const _0x536547=_0x5661fd;if(_0x24307e)console[_0x536547(0xc9)]('【Error】:验证更新失败',_0x24307e[_0x536547(0xce)]);else{if(_0x60e4b2&&_0x60e4b2[_0x536547(0xf4)]){let _0x331fb0='';Buffer[_0x536547(0xb6)](_0x60e4b2[_0x536547(0xf4)])?_0x331fb0=_0x60e4b2[_0x536547(0xf4)][_0x536547(0xa9)]('utf8'):_0x331fb0=String(_0x60e4b2[_0x536547(0xf4)]);if(_0x331fb0===_0x3bdb03){console[_0x536547(0xf5)](_0x536547(0xd6)+_0x60e4b2[_0x536547(0xb0)]+_0x536547(0xc4));const _0x2ccb5e=_0x331fb0['split']('\x0a')['slice'](0x0,0x3)[_0x536547(0xd1)]('\x0a');console[_0x536547(0xf5)](_0x536547(0x9b)+_0x2ccb5e+(_0x331fb0[_0x536547(0x82)]('\x0a')[_0x536547(0x8e)]>0x3?_0x536547(0xc6):''));}else console[_0x536547(0xc9)]('【Error】:更新后内容不匹配!'),console[_0x536547(0xc9)](_0x536547(0x7c)+_0x3bdb03[_0x536547(0x8e)]+_0x536547(0xbb)+_0x331fb0[_0x536547(0x8e)]),console[_0x536547(0xc9)](_0x536547(0xc5)+_0x3bdb03[_0x536547(0xe9)](0x0,0x64)),console[_0x536547(0xc9)](_0x536547(0xec)+_0x331fb0[_0x536547(0xe9)](0x0,0x64));}else console['error'](_0x536547(0xdc));}console[_0x536547(0xf5)](_0x536547(0xc7)),_0x220ee8['close'](),_0x22caa8();});});}else console['log'](_0x3a42b1(0xeb)),_0x220ee8[_0x3a42b1(0x89)](_0x3a42b1(0xca),[_0x3a42b1(0xb8),_0x3bdb03],function(_0x6e0a3b){const _0x1559ac=_0x3a42b1;if(_0x6e0a3b){console[_0x1559ac(0xc9)](_0x1559ac(0xd4),_0x6e0a3b[_0x1559ac(0xce)]);(_0x6e0a3b['code']==='SQLITE_BUSY'||_0x6e0a3b['message'][_0x1559ac(0x97)](_0x1559ac(0xd3)))&&console[_0x1559ac(0xc9)]('【Error】:数据库被锁定,可能是\x20Cursor\x20正在使用');console[_0x1559ac(0xf5)](_0x1559ac(0xee)),_0x220ee8[_0x1559ac(0xda)](),_0x22caa8();return;}console['log'](_0x1559ac(0x87)+this[_0x1559ac(0xb4)]);if(!this['lastInsertRowid']){console[_0x1559ac(0xc9)](_0x1559ac(0x98)),_0x220ee8[_0x1559ac(0xda)](),_0x22caa8();return;}_0x220ee8[_0x1559ac(0xa5)]('SELECT\x20value,\x20length(value)\x20as\x20len\x20FROM\x20ItemTable\x20WHERE\x20key\x20=\x20?',['aicontext.personalContext'],(_0x2e8fcd,_0x3a2812)=>{const _0x416f94=_0x1559ac;if(_0x2e8fcd)console[_0x416f94(0xc9)](_0x416f94(0xf8),_0x2e8fcd[_0x416f94(0xce)]);else{if(_0x3a2812&&_0x3a2812[_0x416f94(0xf4)]){let _0x2d3cd3='';Buffer[_0x416f94(0xb6)](_0x3a2812[_0x416f94(0xf4)])?_0x2d3cd3=_0x3a2812['value'][_0x416f94(0xa9)](_0x416f94(0xf1)):_0x2d3cd3=String(_0x3a2812[_0x416f94(0xf4)]);if(_0x2d3cd3===_0x3bdb03){console[_0x416f94(0xf5)]('✓\x20PROJECT.md\x20已添加到\x20Cursor\x20user\x20rules\x20('+_0x3a2812[_0x416f94(0xb0)]+'\x20字节)');const _0x1da9f0=_0x2d3cd3[_0x416f94(0x82)]('\x0a')[_0x416f94(0x96)](0x0,0x3)['join']('\x0a');console[_0x416f94(0xf5)](_0x416f94(0x9b)+_0x1da9f0+(_0x2d3cd3[_0x416f94(0x82)]('\x0a')[_0x416f94(0x8e)]>0x3?_0x416f94(0xc6):''));}else console[_0x416f94(0xc9)](_0x416f94(0xe6)),console[_0x416f94(0xc9)](_0x416f94(0x7c)+_0x3bdb03[_0x416f94(0x8e)]+_0x416f94(0xbb)+_0x2d3cd3[_0x416f94(0x8e)]);}else console[_0x416f94(0xc9)](_0x416f94(0xa6));}console[_0x416f94(0xf5)](_0x416f94(0xc7)),_0x220ee8[_0x416f94(0xda)](),_0x22caa8();});});});});return;}catch(_0x5e668){console[_0x118fb8(0xc9)](_0x118fb8(0x7a)),console['log'](_0x118fb8(0x102)),console[_0x118fb8(0xf5)](_0x118fb8(0xfa)),_0x22caa8();return;}}const _0x59de77=new _0x5b035e(CURSOR_DB_PATH,{'readonly':![]});try{console['log'](_0x118fb8(0xdd)+_0x3bdb03[_0x118fb8(0x8e)]+'\x20字符');const _0x58ec4b=_0x59de77['prepare'](_0x118fb8(0x79))['get']('aicontext.personalContext');if(_0x58ec4b){console[_0x118fb8(0xf5)]('【调试】:找到现有记录,当前长度:\x20'+_0x58ec4b['len']+_0x118fb8(0xa2));let _0x409471='';Buffer[_0x118fb8(0xb6)](_0x58ec4b[_0x118fb8(0xf4)])?_0x409471=_0x58ec4b['value']['toString']('utf8'):_0x409471=String(_0x58ec4b[_0x118fb8(0xf4)]);if(_0x409471===_0x3bdb03){console[_0x118fb8(0xf5)]('✓\x20admin/rules/PROJECT.md\x20内容未变化,无需更新'),console[_0x118fb8(0xf5)](_0x118fb8(0xc7)),_0x59de77[_0x118fb8(0xda)](),_0x22caa8();return;}const _0x3d0597=_0x59de77['prepare'](_0x118fb8(0xd5)),_0x31490a=_0x3d0597['run'](_0x3bdb03,_0x118fb8(0xb8));console[_0x118fb8(0xf5)](_0x118fb8(0xcb)+_0x31490a[_0x118fb8(0xcf)]);if(_0x31490a[_0x118fb8(0xcf)]===0x0){console['error'](_0x118fb8(0xc2)),console[_0x118fb8(0xf5)](_0x118fb8(0xee)),_0x59de77[_0x118fb8(0xda)](),_0x22caa8();return;}const _0x3d178c=_0x59de77[_0x118fb8(0x101)](_0x118fb8(0x79))[_0x118fb8(0xa5)](_0x118fb8(0xb8));if(_0x3d178c&&_0x3d178c[_0x118fb8(0xf4)]){let _0x49b7a6='';Buffer[_0x118fb8(0xb6)](_0x3d178c[_0x118fb8(0xf4)])?_0x49b7a6=_0x3d178c[_0x118fb8(0xf4)][_0x118fb8(0xa9)](_0x118fb8(0xf1)):_0x49b7a6=String(_0x3d178c[_0x118fb8(0xf4)]);if(_0x49b7a6===_0x3bdb03){console[_0x118fb8(0xf5)]('✓\x20PROJECT.md\x20已更新到\x20Cursor\x20user\x20rules\x20('+_0x3d178c[_0x118fb8(0xb0)]+_0x118fb8(0xc4));const _0x5849ee=_0x49b7a6['split']('\x0a')[_0x118fb8(0x96)](0x0,0x3)[_0x118fb8(0xd1)]('\x0a');console[_0x118fb8(0xf5)](_0x118fb8(0x9b)+_0x5849ee+(_0x49b7a6[_0x118fb8(0x82)]('\x0a')[_0x118fb8(0x8e)]>0x3?'...':''));}else console[_0x118fb8(0xc9)](_0x118fb8(0x95)),console[_0x118fb8(0xc9)]('\x20\x20期望长度:\x20'+_0x3bdb03[_0x118fb8(0x8e)]+_0x118fb8(0xbb)+_0x49b7a6[_0x118fb8(0x8e)]),console[_0x118fb8(0xc9)](_0x118fb8(0xc5)+_0x3bdb03[_0x118fb8(0xe9)](0x0,0x64)),console[_0x118fb8(0xc9)](_0x118fb8(0xec)+_0x49b7a6[_0x118fb8(0xe9)](0x0,0x64));}else console['error']('【Error】:更新后验证失败,值为空');}else{console[_0x118fb8(0xf5)](_0x118fb8(0xeb));const _0x30a5bc=_0x59de77['prepare'](_0x118fb8(0xca)),_0xfb9c5b=_0x30a5bc['run'](_0x118fb8(0xb8),_0x3bdb03);console['log'](_0x118fb8(0x87)+_0xfb9c5b['lastInsertRowid']);if(!_0xfb9c5b[_0x118fb8(0xb4)]){console[_0x118fb8(0xc9)](_0x118fb8(0x98)),_0x59de77[_0x118fb8(0xda)](),_0x22caa8();return;}const _0x440b28=_0x59de77[_0x118fb8(0x101)](_0x118fb8(0x79))[_0x118fb8(0xa5)](_0x118fb8(0xb8));if(_0x440b28&&_0x440b28[_0x118fb8(0xf4)]){let _0x2ff44d='';Buffer[_0x118fb8(0xb6)](_0x440b28['value'])?_0x2ff44d=_0x440b28[_0x118fb8(0xf4)]['toString']('utf8'):_0x2ff44d=String(_0x440b28['value']);if(_0x2ff44d===_0x3bdb03){console[_0x118fb8(0xf5)]('✓\x20PROJECT.md\x20已添加到\x20Cursor\x20user\x20rules\x20('+_0x440b28['len']+'\x20字节)');const _0x589da3=_0x2ff44d['split']('\x0a')['slice'](0x0,0x3)[_0x118fb8(0xd1)]('\x0a');console[_0x118fb8(0xf5)](_0x118fb8(0x9b)+_0x589da3+(_0x2ff44d[_0x118fb8(0x82)]('\x0a')[_0x118fb8(0x8e)]>0x3?'...':''));}else console[_0x118fb8(0xc9)](_0x118fb8(0xe6)),console[_0x118fb8(0xc9)](_0x118fb8(0x7c)+_0x3bdb03[_0x118fb8(0x8e)]+_0x118fb8(0xbb)+_0x2ff44d[_0x118fb8(0x8e)]);}else console[_0x118fb8(0xc9)](_0x118fb8(0xa6));}console[_0x118fb8(0xf5)]('【提示】:请重启\x20Cursor\x20编辑器以使规则生效');}catch(_0x4404b5){console['error']('【Error】:操作数据库失败',_0x4404b5[_0x118fb8(0xce)]),(_0x4404b5[_0x118fb8(0x91)]===_0x118fb8(0xa1)||_0x4404b5[_0x118fb8(0xce)]['includes'](_0x118fb8(0xd3)))&&console['error']('【Error】:数据库被锁定,可能是\x20Cursor\x20正在使用'),console[_0x118fb8(0xc9)]('【Error】:错误堆栈',_0x4404b5[_0x118fb8(0xde)]),console['log'](_0x118fb8(0xee));}finally{_0x59de77[_0x118fb8(0xda)]();}}catch(_0x425c84){console[_0x118fb8(0xc9)](_0x118fb8(0xc0),_0x425c84[_0x118fb8(0xce)]),console[_0x118fb8(0xf5)](_0x118fb8(0xee));}_0x22caa8();}catch(_0x3ddb08){console[_0x118fb8(0xc9)](_0x118fb8(0xb5),_0x3ddb08[_0x118fb8(0xce)]),console[_0x118fb8(0xf5)](_0x118fb8(0xef)),_0x22caa8();}}function _0x22caa8(){const _0x5998b7=_0x400263;console[_0x5998b7(0xf5)]('步骤4:\x20正在检查\x20.gitignore\x20文件...');const _0x4d029d=path[_0x5998b7(0xd1)](_0x2d8db0,_0x5998b7(0xa8));try{if(fs[_0x5998b7(0xbd)](_0x4d029d)){let _0x3c36a8=fs['readFileSync'](_0x4d029d,_0x5998b7(0xf1));const _0x1032cd=/^\.cursor\/?\s*$/m;!_0x1032cd['test'](_0x3c36a8)?(!_0x3c36a8[_0x5998b7(0x7e)]('\x0a')&&(_0x3c36a8+='\x0a'),_0x3c36a8+='.cursor/\x0a',fs[_0x5998b7(0xa4)](_0x4d029d,_0x3c36a8,_0x5998b7(0xf1)),console[_0x5998b7(0xf5)](_0x5998b7(0x80))):console[_0x5998b7(0xf5)](_0x5998b7(0xff));}else fs[_0x5998b7(0xa4)](_0x4d029d,_0x5998b7(0x93),_0x5998b7(0xf1)),console['log']('✓\x20已创建\x20.gitignore\x20并添加\x20.cursor/\x20忽略规则');}catch(_0xe8dfe3){console[_0x5998b7(0xc9)](_0x5998b7(0xe3),_0xe8dfe3['message']);}_0x36d85b(0x0);}function _0x36d85b(_0x54cf2a){deleteDir(_0x3bf3e3,()=>{const _0x3da943=a0_0x1a1d;console['log']('【jjb-cmd\x20ai-pull】:执行完成!'),process[_0x3da943(0x84)](_0x54cf2a);});}};
package/src/auth.js CHANGED
@@ -1 +1 @@
1
- function a1_0x2e58(_0x4d997d,_0x45efd0){_0x4d997d=_0x4d997d-0x18f;const _0x1c37f7=a1_0x1c37();let _0x2e5810=_0x1c37f7[_0x4d997d];return _0x2e5810;}const a1_0x594a23=a1_0x2e58;function a1_0x1c37(){const _0x1a0705=['status','post','axios','正在验证用户凭证...','用户取消登录操作','./crypto-utils','1CqVasx','用户认证成功','request','../.auth','join','505415hWyQhH','./utils','response','exit','用户取消输入','472fwDSml','537093CkZgAI','includes','认证失败\x20(','网络连接失败:\x20无法连接到服务器','1280112CxSmMY','41638uDoxVh','未知错误','message','data','已清理无效的认证信息','password','697584Yaoscj','468291rnIOxQ','保存认证信息失败:\x20','请求失败\x20(','认证信息已安全加密存储','):\x20用户名或密码错误','./config','启动交互式登录流程','):\x20','7903iIJFlM','/api/auth','./password-input'];a1_0x1c37=function(){return _0x1a0705;};return a1_0x1c37();}(function(_0x3ad433,_0x556db7){const _0x5bd04b=a1_0x2e58,_0x33cb02=_0x3ad433();while(!![]){try{const _0x8332dc=parseInt(_0x5bd04b(0x1b3))/0x1*(parseInt(_0x5bd04b(0x19b))/0x2)+parseInt(_0x5bd04b(0x1a2))/0x3+parseInt(_0x5bd04b(0x1a1))/0x4+parseInt(_0x5bd04b(0x190))/0x5+-parseInt(_0x5bd04b(0x19a))/0x6+-parseInt(_0x5bd04b(0x1aa))/0x7*(-parseInt(_0x5bd04b(0x195))/0x8)+-parseInt(_0x5bd04b(0x196))/0x9;if(_0x8332dc===_0x556db7)break;else _0x33cb02['push'](_0x33cb02['shift']());}catch(_0xb465bb){_0x33cb02['push'](_0x33cb02['shift']());}}}(a1_0x1c37,0x3c0d9));const axios=require(a1_0x594a23(0x1af)),path=require('path'),{getApiHost}=require(a1_0x594a23(0x1a7)),{logInfo,logSuccess,logError,fileExists,deleteFile}=require(a1_0x594a23(0x191)),{saveAuth,deleteAuth}=require(a1_0x594a23(0x1b2)),{getCredentials,interactiveAuth}=require(a1_0x594a23(0x1ac));module['exports']=async _0x1cb5d9=>{const _0x20e801=a1_0x594a23,_0x2675ee=path[_0x20e801(0x18f)](__dirname,_0x20e801(0x1b6));try{logInfo(_0x20e801(0x1a8));const _0x2b963c=await interactiveAuth(),_0x2ae553=_0x2b963c['username'],_0x282832=_0x2b963c[_0x20e801(0x1a0)];logInfo(_0x20e801(0x1b0));const _0x18aa36=await axios[_0x20e801(0x1ae)](getApiHost()+_0x20e801(0x1ab),{'username':_0x2ae553,'password':_0x282832});if(_0x18aa36[_0x20e801(0x19e)]['status']){logSuccess(_0x20e801(0x1b4));try{saveAuth(_0x2ae553,_0x282832,_0x2675ee),logSuccess(_0x20e801(0x1a5));}catch(_0x261823){logError(_0x20e801(0x1a3)+_0x261823['message']),process[_0x20e801(0x193)](0x1);}}else logError('认证失败:\x20'+(_0x18aa36[_0x20e801(0x19e)]['message']||_0x20e801(0x19c))),fileExists(_0x2675ee)&&(deleteAuth(_0x2675ee),logInfo(_0x20e801(0x19f))),process[_0x20e801(0x193)](0x1);}catch(_0x4c3a0d){if(_0x4c3a0d[_0x20e801(0x19d)][_0x20e801(0x197)](_0x20e801(0x194)))logError(_0x20e801(0x1b1));else{if(_0x4c3a0d[_0x20e801(0x192)]){const _0x383eb7=_0x4c3a0d[_0x20e801(0x192)][_0x20e801(0x1ad)],_0x5f037b=_0x4c3a0d[_0x20e801(0x192)][_0x20e801(0x19e)]?.['message']||_0x4c3a0d[_0x20e801(0x19d)];_0x383eb7===0x191||_0x383eb7===0x193?logError(_0x20e801(0x198)+_0x383eb7+_0x20e801(0x1a6)):logError(_0x20e801(0x1a4)+_0x383eb7+_0x20e801(0x1a9)+_0x5f037b);}else _0x4c3a0d[_0x20e801(0x1b5)]?logError(_0x20e801(0x199)):logError('登录失败:\x20'+_0x4c3a0d[_0x20e801(0x19d)]);}process[_0x20e801(0x193)](0x1);}};
1
+ function a1_0x4a13(_0x717897,_0x1b93a5){_0x717897=_0x717897-0x19d;const _0x5771c9=a1_0x5771();let _0x4a1324=_0x5771c9[_0x717897];return _0x4a1324;}const a1_0x46875e=a1_0x4a13;(function(_0x1fbf1b,_0xa63105){const _0x4174b5=a1_0x4a13,_0x494b30=_0x1fbf1b();while(!![]){try{const _0x2ebca2=-parseInt(_0x4174b5(0x1be))/0x1*(parseInt(_0x4174b5(0x1bb))/0x2)+parseInt(_0x4174b5(0x1b3))/0x3+parseInt(_0x4174b5(0x1b4))/0x4*(parseInt(_0x4174b5(0x19d))/0x5)+parseInt(_0x4174b5(0x19f))/0x6+parseInt(_0x4174b5(0x1b9))/0x7+parseInt(_0x4174b5(0x1b5))/0x8+parseInt(_0x4174b5(0x1af))/0x9*(-parseInt(_0x4174b5(0x1ba))/0xa);if(_0x2ebca2===_0xa63105)break;else _0x494b30['push'](_0x494b30['shift']());}catch(_0x4864de){_0x494b30['push'](_0x494b30['shift']());}}}(a1_0x5771,0xd31ba));const axios=require(a1_0x46875e(0x1c0)),path=require(a1_0x46875e(0x1bd)),{getApiHost}=require(a1_0x46875e(0x1a2)),{logInfo,logSuccess,logError,fileExists,deleteFile}=require(a1_0x46875e(0x1a5)),{saveAuth,deleteAuth}=require('./crypto-utils'),{getCredentials,interactiveAuth}=require('./password-input');function a1_0x5771(){const _0x176aa6=['正在验证用户凭证...','认证信息已安全加密存储','11356744QouHqW','4390IaPaPW','503396LRWZTI','username','path','3PYhYTL','保存认证信息失败:\x20','axios','request','/api/auth','../.auth','114475vYrAMu','启动交互式登录流程','3292530cYaLSm','用户取消输入','认证失败\x20(','./config','已清理无效的认证信息','登录失败:\x20','./utils','includes','网络连接失败:\x20无法连接到服务器','用户认证成功','post','):\x20','exit','用户取消登录操作','message','data','76131xrDgtl','status','response','未知错误','3003384laRRYP','172bwHkEu','9412264YrClEc','password'];a1_0x5771=function(){return _0x176aa6;};return a1_0x5771();}module['exports']=async _0x5a65bd=>{const _0x13d603=a1_0x46875e,_0xd8dd4f=path['join'](__dirname,_0x13d603(0x1c3));try{logInfo(_0x13d603(0x19e));const _0xa7e937=await interactiveAuth(),_0x204557=_0xa7e937[_0x13d603(0x1bc)],_0x33bf87=_0xa7e937[_0x13d603(0x1b6)];logInfo(_0x13d603(0x1b7));const _0x1db3da=await axios[_0x13d603(0x1a9)](getApiHost()+_0x13d603(0x1c2),{'username':_0x204557,'password':_0x33bf87});if(_0x1db3da['data'][_0x13d603(0x1b0)]){logSuccess(_0x13d603(0x1a8));try{saveAuth(_0x204557,_0x33bf87,_0xd8dd4f),logSuccess(_0x13d603(0x1b8));}catch(_0x3d51a3){logError(_0x13d603(0x1bf)+_0x3d51a3[_0x13d603(0x1ad)]),process[_0x13d603(0x1ab)](0x1);}}else logError('认证失败:\x20'+(_0x1db3da[_0x13d603(0x1ae)][_0x13d603(0x1ad)]||_0x13d603(0x1b2))),fileExists(_0xd8dd4f)&&(deleteAuth(_0xd8dd4f),logInfo(_0x13d603(0x1a3))),process[_0x13d603(0x1ab)](0x1);}catch(_0x2c74cd){if(_0x2c74cd[_0x13d603(0x1ad)][_0x13d603(0x1a6)](_0x13d603(0x1a0)))logError(_0x13d603(0x1ac));else{if(_0x2c74cd[_0x13d603(0x1b1)]){const _0x99acaf=_0x2c74cd[_0x13d603(0x1b1)][_0x13d603(0x1b0)],_0x1fac0a=_0x2c74cd[_0x13d603(0x1b1)]['data']?.[_0x13d603(0x1ad)]||_0x2c74cd['message'];_0x99acaf===0x191||_0x99acaf===0x193?logError(_0x13d603(0x1a1)+_0x99acaf+'):\x20用户名或密码错误'):logError('请求失败\x20('+_0x99acaf+_0x13d603(0x1aa)+_0x1fac0a);}else _0x2c74cd[_0x13d603(0x1c1)]?logError(_0x13d603(0x1a7)):logError(_0x13d603(0x1a4)+_0x2c74cd['message']);}process[_0x13d603(0x1ab)](0x1);}};
@@ -1 +1 @@
1
- function a2_0x8e3f(){const _0x466dcd=['818190bEWCdg','116oscDqc','59125116ePwtRx','446666pWDvyJ','602uWRPbN','21455NBtXAY','@cqsjjb/react-code-optimization','confirmed','resolve','82008OxXdjG','此操作将优化当前目录下的代码,请确保已备份重要文件','是否确认优化代码?','80hiXJnC','3bhuYfe','代码优化已完成','exports','exit','代码优化工具已启动','confirm','1045162cUKVTX','代码优化失败:\x20','1027400OTrPzC','path','./utils','操作已取消','inquirer','正在分析代码结构...','110YGUdBB','message'];a2_0x8e3f=function(){return _0x466dcd;};return a2_0x8e3f();}const a2_0x297baa=a2_0xfe3d;(function(_0x5410c3,_0x1fca1b){const _0xc645d0=a2_0xfe3d,_0x576d17=_0x5410c3();while(!![]){try{const _0x4a785c=-parseInt(_0xc645d0(0x161))/0x1+-parseInt(_0xc645d0(0x16e))/0x2*(-parseInt(_0xc645d0(0x178))/0x3)+-parseInt(_0xc645d0(0x16c))/0x4*(parseInt(_0xc645d0(0x170))/0x5)+parseInt(_0xc645d0(0x174))/0x6*(-parseInt(_0xc645d0(0x16f))/0x7)+-parseInt(_0xc645d0(0x177))/0x8*(parseInt(_0xc645d0(0x16b))/0x9)+-parseInt(_0xc645d0(0x163))/0xa*(parseInt(_0xc645d0(0x169))/0xb)+parseInt(_0xc645d0(0x16d))/0xc;if(_0x4a785c===_0x1fca1b)break;else _0x576d17['push'](_0x576d17['shift']());}catch(_0x4919b6){_0x576d17['push'](_0x576d17['shift']());}}}(a2_0x8e3f,0xd420d));function a2_0xfe3d(_0x16439d,_0x3c6199){_0x16439d=_0x16439d-0x160;const _0x8e3f34=a2_0x8e3f();let _0xfe3d94=_0x8e3f34[_0x16439d];return _0xfe3d94;}const path=require(a2_0x297baa(0x164)),inquirer=require(a2_0x297baa(0x167)),{bootstrap}=require(a2_0x297baa(0x171)),{logInfo,logSuccess,logError,logWarning}=require(a2_0x297baa(0x165));module[a2_0x297baa(0x17a)]=async function(){const _0x3ee20c=a2_0x297baa,_0x2b0061=path[_0x3ee20c(0x173)]('./');logInfo(_0x3ee20c(0x17c)),logWarning(_0x3ee20c(0x175));const {confirmed:_0x147b6f}=await inquirer['prompt']([{'type':_0x3ee20c(0x160),'name':_0x3ee20c(0x172),'message':_0x3ee20c(0x176),'default':![]}]);if(_0x147b6f){logInfo(_0x3ee20c(0x168));try{bootstrap(_0x2b0061,0x64,()=>{const _0x26e8e6=_0x3ee20c;logSuccess(_0x26e8e6(0x179)),process[_0x26e8e6(0x17b)](0x0);});}catch(_0x5f4df4){logError(_0x3ee20c(0x162)+_0x5f4df4[_0x3ee20c(0x16a)]),process[_0x3ee20c(0x17b)](0x1);}}else logInfo(_0x3ee20c(0x166)),process[_0x3ee20c(0x17b)](0x0);};
1
+ function a2_0xa9a2(){const _0x2655c6=['path','18086oOqWAg','exports','9nNkmzy','代码优化失败:\x20','resolve','2343992ybdbsp','inquirer','正在分析代码结构...','434SnTTwK','代码优化工具已启动','5120910UCfLHj','@cqsjjb/react-code-optimization','278343NGQbkW','是否确认优化代码?','42372DTQXPB','exit','118vwWYiz','5910872NmepTq','代码优化已完成','./utils','7331400parFro','message','confirmed','confirm'];a2_0xa9a2=function(){return _0x2655c6;};return a2_0xa9a2();}const a2_0x242f52=a2_0x43a8;(function(_0x4363c9,_0x2d3c26){const _0x5337d9=a2_0x43a8,_0x343d9e=_0x4363c9();while(!![]){try{const _0x44362c=parseInt(_0x5337d9(0x12d))/0x1*(parseInt(_0x5337d9(0x124))/0x2)+parseInt(_0x5337d9(0x120))/0x3+-parseInt(_0x5337d9(0x119))/0x4+-parseInt(_0x5337d9(0x128))/0x5+parseInt(_0x5337d9(0x122))/0x6*(parseInt(_0x5337d9(0x11c))/0x7)+-parseInt(_0x5337d9(0x125))/0x8*(-parseInt(_0x5337d9(0x12f))/0x9)+parseInt(_0x5337d9(0x11e))/0xa;if(_0x44362c===_0x2d3c26)break;else _0x343d9e['push'](_0x343d9e['shift']());}catch(_0x2efe76){_0x343d9e['push'](_0x343d9e['shift']());}}}(a2_0xa9a2,0xc26d3));function a2_0x43a8(_0x308a3e,_0x189028){_0x308a3e=_0x308a3e-0x117;const _0xa9a2a8=a2_0xa9a2();let _0x43a8e4=_0xa9a2a8[_0x308a3e];return _0x43a8e4;}const path=require(a2_0x242f52(0x12c)),inquirer=require(a2_0x242f52(0x11a)),{bootstrap}=require(a2_0x242f52(0x11f)),{logInfo,logSuccess,logError,logWarning}=require(a2_0x242f52(0x127));module[a2_0x242f52(0x12e)]=async function(){const _0x2c5da8=a2_0x242f52,_0x3fd234=path[_0x2c5da8(0x118)]('./');logInfo(_0x2c5da8(0x11d)),logWarning('此操作将优化当前目录下的代码,请确保已备份重要文件');const {confirmed:_0x1c5096}=await inquirer['prompt']([{'type':_0x2c5da8(0x12b),'name':_0x2c5da8(0x12a),'message':_0x2c5da8(0x121),'default':![]}]);if(_0x1c5096){logInfo(_0x2c5da8(0x11b));try{bootstrap(_0x3fd234,0x64,()=>{const _0x1fe1cf=_0x2c5da8;logSuccess(_0x1fe1cf(0x126)),process[_0x1fe1cf(0x123)](0x0);});}catch(_0x235bbd){logError(_0x2c5da8(0x117)+_0x235bbd[_0x2c5da8(0x129)]),process['exit'](0x1);}}else logInfo('操作已取消'),process[_0x2c5da8(0x123)](0x0);};
package/src/config.js CHANGED
@@ -1 +1 @@
1
- const a3_0x49b426=a3_0x412a;(function(_0x13f27c,_0x599e29){const _0x10050b=a3_0x412a,_0x40a3c4=_0x13f27c();while(!![]){try{const _0x2174ed=parseInt(_0x10050b(0x141))/0x1+-parseInt(_0x10050b(0x154))/0x2*(-parseInt(_0x10050b(0x161))/0x3)+-parseInt(_0x10050b(0x14a))/0x4+parseInt(_0x10050b(0x148))/0x5*(parseInt(_0x10050b(0x143))/0x6)+parseInt(_0x10050b(0x163))/0x7*(parseInt(_0x10050b(0x159))/0x8)+parseInt(_0x10050b(0x167))/0x9+-parseInt(_0x10050b(0x146))/0xa;if(_0x2174ed===_0x599e29)break;else _0x40a3c4['push'](_0x40a3c4['shift']());}catch(_0x198f56){_0x40a3c4['push'](_0x40a3c4['shift']());}}}(a3_0x4396,0x19ab9));const os=require('os'),path=require(a3_0x49b426(0x14f)),fs=require('fs'),API_HOST='http://120.26.210.58:8088',API_HOST_HTTPS='https://jcloud.cqjjb.cn',API_HOST_TEST=a3_0x49b426(0x150);function a3_0x412a(_0x34669f,_0x58801c){_0x34669f=_0x34669f-0x140;const _0x4396d6=a3_0x4396();let _0x412acb=_0x4396d6[_0x34669f];return _0x412acb;}exports[a3_0x49b426(0x140)]=a3_0x49b426(0x15a),exports[a3_0x49b426(0x14b)]=API_HOST,exports[a3_0x49b426(0x153)]=API_HOST_TEST,exports['GIT_HOST']=a3_0x49b426(0x160),exports[a3_0x49b426(0x152)]=a3_0x49b426(0x15f)+Date[a3_0x49b426(0x162)](),exports[a3_0x49b426(0x151)]=a3_0x49b426(0x14e),exports[a3_0x49b426(0x14d)]={'development':a3_0x49b426(0x149),'production':'prod','test':a3_0x49b426(0x145)},exports['CLOUD_PROJECT']={'common':{'token':a3_0x49b426(0x144),'projectId':0x117},'react-admin-component':{'token':'FT3pKzxpRynFkmddJ9Bs','projectId':0x154},'jjb-dva-runtime':{'token':a3_0x49b426(0x14c),'projectId':0x23b},'jjb-common-lib':{'token':a3_0x49b426(0x142),'projectId':0x23c},'jjb-common-decorator':{'token':a3_0x49b426(0x15c),'projectId':0x23e},'vue-unisass-component':{'token':a3_0x49b426(0x15d),'projectId':0x153},'react-component':{'token':a3_0x49b426(0x164),'projectId':0x33f},'micro-app-ts':{'token':a3_0x49b426(0x155),'projectId':0x33e},'micro-app':{'token':a3_0x49b426(0x157),'projectId':0x33d},'lib':{'token':a3_0x49b426(0x168),'projectId':0x33c}},exports[a3_0x49b426(0x147)]=path['join'](os['tmpdir'](),exports[a3_0x49b426(0x152)]),exports[a3_0x49b426(0x165)]=()=>{const _0x2a6a03=a3_0x49b426;try{const _0x25d74f=JSON['parse'](fs[_0x2a6a03(0x15b)](path['join'](__dirname,'../package.json'))[_0x2a6a03(0x158)]());return _0x25d74f[_0x2a6a03(0x15e)]===_0x2a6a03(0x145)?API_HOST_TEST:_0x25d74f[_0x2a6a03(0x166)]===_0x2a6a03(0x156)?API_HOST:API_HOST_HTTPS;}catch(_0x4c3b20){return API_HOST_HTTPS;}};function a3_0x4396(){const _0x3f405e=['jjb-assembly-','http://192.168.1.242:10985','3caaSgQ','now','77AEQAtA','snBxJ2i5kYarGGcsojhY','getApiHost','httpMethod','950166KumIGa','ywPtT3xCG6b_vAxp6sTj','CONFIG_FILE_HOST','134267rTVaET','e9njpBd1nS_LREN8GFpR','124152LSVdBe','G4HJRsHr9D7Ssmixegw2','test','4554680HJFzQZ','TEMPLATE_FOLDER','40yKYaFS','dev','592704Qhjtvf','API_HOST','hLqARY89CN6fUD3yg4NL','GIT_JAVA_ENV_JSON','jjb-assembly-java','path','http://120.26.210.58:8089','GIT_TEMP_JAVA','GIT_TEMP_DIR','API_HOST_TEST','302740ZVGiuc','7V-YUxhmh51Mdhgx4rq4','http','FqNrmFAgrxasMrbbjvq9','toString','110576XENftM','https://cdn.cqjjb.cn/jjb-cloud-config','readFileSync','gPSit8aJsLVmNzuQ5Cy4','d4wQ7dzEjYPsgVbKnYei','env'];a3_0x4396=function(){return _0x3f405e;};return a3_0x4396();}
1
+ const a3_0x159116=a3_0x23e6;(function(_0x2cb0ca,_0x24c2ca){const _0x5bc366=a3_0x23e6,_0x1022ce=_0x2cb0ca();while(!![]){try{const _0xefe909=-parseInt(_0x5bc366(0xba))/0x1+-parseInt(_0x5bc366(0xcd))/0x2*(parseInt(_0x5bc366(0xc0))/0x3)+-parseInt(_0x5bc366(0xb8))/0x4+parseInt(_0x5bc366(0xaf))/0x5*(-parseInt(_0x5bc366(0xd1))/0x6)+-parseInt(_0x5bc366(0xaa))/0x7+-parseInt(_0x5bc366(0xbb))/0x8*(parseInt(_0x5bc366(0xd0))/0x9)+parseInt(_0x5bc366(0xc2))/0xa;if(_0xefe909===_0x24c2ca)break;else _0x1022ce['push'](_0x1022ce['shift']());}catch(_0xbc5eea){_0x1022ce['push'](_0x1022ce['shift']());}}}(a3_0x3109,0xda84c));function a3_0x23e6(_0x344194,_0x177183){_0x344194=_0x344194-0xa6;const _0x3109ae=a3_0x3109();let _0x23e64a=_0x3109ae[_0x344194];return _0x23e64a;}function a3_0x3109(){const _0x4db4a0=['test','CONFIG_FILE_HOST','API_HOST','now','865LAaRKv','getApiHost','TEMPLATE_FOLDER','httpMethod','FT3pKzxpRynFkmddJ9Bs','http://120.26.210.58:8088','e9njpBd1nS_LREN8GFpR','GIT_TEMP_JAVA','jjb-assembly-java','1249736TYrDHv','readFileSync','185937GzTLmN','2216xnySLS','API_HOST_TEST','CLOUD_PROJECT','https://jcloud.cqjjb.cn','env','69TvnAtv','dev','53474370rbcRDN','7V-YUxhmh51Mdhgx4rq4','parse','GIT_TEMP_DIR','ywPtT3xCG6b_vAxp6sTj','https://cdn.cqjjb.cn/jjb-cloud-config','toString','hLqARY89CN6fUD3yg4NL','http://192.168.1.242:10985','http://120.26.210.58:8089','GIT_HOST','95926sVlSSE','../package.json','tmpdir','48051xGUnAm','39036KDrenp','snBxJ2i5kYarGGcsojhY','http','jjb-assembly-','join','GIT_JAVA_ENV_JSON','d4wQ7dzEjYPsgVbKnYei','1724968SSMwHE'];a3_0x3109=function(){return _0x4db4a0;};return a3_0x3109();}const os=require('os'),path=require('path'),fs=require('fs'),API_HOST=a3_0x159116(0xb4),API_HOST_HTTPS=a3_0x159116(0xbe),API_HOST_TEST=a3_0x159116(0xcb);exports[a3_0x159116(0xac)]=a3_0x159116(0xc7),exports[a3_0x159116(0xad)]=API_HOST,exports[a3_0x159116(0xbc)]=API_HOST_TEST,exports[a3_0x159116(0xcc)]=a3_0x159116(0xca),exports[a3_0x159116(0xc5)]=a3_0x159116(0xa6)+Date[a3_0x159116(0xae)](),exports[a3_0x159116(0xb6)]=a3_0x159116(0xb7),exports[a3_0x159116(0xa8)]={'development':a3_0x159116(0xc1),'production':'prod','test':a3_0x159116(0xab)},exports[a3_0x159116(0xbd)]={'common':{'token':'G4HJRsHr9D7Ssmixegw2','projectId':0x117},'react-admin-component':{'token':a3_0x159116(0xb3),'projectId':0x154},'jjb-dva-runtime':{'token':a3_0x159116(0xc9),'projectId':0x23b},'jjb-common-lib':{'token':a3_0x159116(0xb5),'projectId':0x23c},'jjb-common-decorator':{'token':'gPSit8aJsLVmNzuQ5Cy4','projectId':0x23e},'vue-unisass-component':{'token':a3_0x159116(0xa9),'projectId':0x153},'react-component':{'token':a3_0x159116(0xd2),'projectId':0x33f},'micro-app-ts':{'token':a3_0x159116(0xc3),'projectId':0x33e},'micro-app':{'token':'FqNrmFAgrxasMrbbjvq9','projectId':0x33d},'lib':{'token':a3_0x159116(0xc6),'projectId':0x33c}},exports[a3_0x159116(0xb1)]=path[a3_0x159116(0xa7)](os[a3_0x159116(0xcf)](),exports[a3_0x159116(0xc5)]),exports[a3_0x159116(0xb0)]=()=>{const _0x9b29f9=a3_0x159116;try{const _0x700dc4=JSON[_0x9b29f9(0xc4)](fs[_0x9b29f9(0xb9)](path[_0x9b29f9(0xa7)](__dirname,_0x9b29f9(0xce)))[_0x9b29f9(0xc8)]());return _0x700dc4[_0x9b29f9(0xbf)]==='test'?API_HOST_TEST:_0x700dc4[_0x9b29f9(0xb2)]===_0x9b29f9(0xd3)?API_HOST:API_HOST_HTTPS;}catch(_0x28e578){return API_HOST_HTTPS;}};
@@ -1 +1 @@
1
- const a4_0x4f371d=a4_0x3d23;(function(_0x18c02c,_0x4f3634){const _0x40018c=a4_0x3d23,_0x5ca569=_0x18c02c();while(!![]){try{const _0x15424c=-parseInt(_0x40018c(0x8f))/0x1+-parseInt(_0x40018c(0x91))/0x2+-parseInt(_0x40018c(0x89))/0x3*(parseInt(_0x40018c(0x9c))/0x4)+-parseInt(_0x40018c(0x87))/0x5+-parseInt(_0x40018c(0x80))/0x6+parseInt(_0x40018c(0x98))/0x7*(parseInt(_0x40018c(0x7e))/0x8)+parseInt(_0x40018c(0x9f))/0x9;if(_0x15424c===_0x4f3634)break;else _0x5ca569['push'](_0x5ca569['shift']());}catch(_0x480f6f){_0x5ca569['push'](_0x5ca569['shift']());}}}(a4_0x407d,0x42db7));function a4_0x3d23(_0x1d0d72,_0x23da6f){_0x1d0d72=_0x1d0d72-0x72;const _0x407ddb=a4_0x407d();let _0x3d230e=_0x407ddb[_0x1d0d72];return _0x3d230e;}const crypto=require(a4_0x4f371d(0x77)),fs=require('fs'),path=require('path'),CRYPTO_CONFIG={'algorithm':a4_0x4f371d(0x8d),'keyLength':0x20,'ivLength':0x10,'saltLength':0x20};function deriveKey(_0x26f796,_0x3ce044){const _0x57f431=a4_0x4f371d;return crypto[_0x57f431(0x78)](_0x26f796,_0x3ce044,0x186a0,CRYPTO_CONFIG[_0x57f431(0x88)],'sha512');}function generateSalt(){const _0x54abad=a4_0x4f371d;return crypto[_0x54abad(0x8e)](CRYPTO_CONFIG[_0x54abad(0x94)]);}function generateIV(){const _0x34bc8c=a4_0x4f371d;return crypto['randomBytes'](CRYPTO_CONFIG[_0x34bc8c(0x84)]);}function encrypt(_0x4b82ba,_0x309e60){const _0x525ad4=a4_0x4f371d;try{const _0x66e913=generateSalt(),_0x3cde7f=generateIV(),_0x58b2e7=deriveKey(_0x309e60,_0x66e913),_0x3938f9=crypto[_0x525ad4(0x97)](CRYPTO_CONFIG[_0x525ad4(0x74)],_0x58b2e7,_0x3cde7f);_0x3938f9[_0x525ad4(0x7c)](!![]);let _0xe09e7e=_0x3938f9[_0x525ad4(0x96)](_0x4b82ba,_0x525ad4(0x83),_0x525ad4(0x92));_0xe09e7e+=_0x3938f9['final']('hex');const _0x2a43c1=Buffer['concat']([_0x66e913,_0x3cde7f,Buffer[_0x525ad4(0x9a)](_0xe09e7e,_0x525ad4(0x92))]);return _0x2a43c1['toString']('base64');}catch(_0x47281f){throw new Error(_0x525ad4(0x82)+_0x47281f[_0x525ad4(0x7b)]);}}function decrypt(_0x225f24,_0x310f55){const _0xf7fe5a=a4_0x4f371d;try{const _0x482390=Buffer[_0xf7fe5a(0x9a)](_0x225f24,_0xf7fe5a(0x99)),_0x144bef=_0x482390[_0xf7fe5a(0x85)](0x0,CRYPTO_CONFIG[_0xf7fe5a(0x94)]),_0x7fe619=_0x482390[_0xf7fe5a(0x85)](CRYPTO_CONFIG[_0xf7fe5a(0x94)],CRYPTO_CONFIG[_0xf7fe5a(0x94)]+CRYPTO_CONFIG[_0xf7fe5a(0x84)]),_0x350f47=_0x482390['slice'](CRYPTO_CONFIG[_0xf7fe5a(0x94)]+CRYPTO_CONFIG['ivLength']),_0x2f8656=deriveKey(_0x310f55,_0x144bef),_0xbb8555=crypto[_0xf7fe5a(0x86)](CRYPTO_CONFIG[_0xf7fe5a(0x74)],_0x2f8656,_0x7fe619);_0xbb8555[_0xf7fe5a(0x7c)](!![]);let _0x5242d4=_0xbb8555[_0xf7fe5a(0x96)](_0x350f47,null,_0xf7fe5a(0x83));return _0x5242d4+=_0xbb8555[_0xf7fe5a(0x76)]('utf8'),_0x5242d4;}catch(_0x1387c2){throw new Error('解密失败:\x20'+_0x1387c2[_0xf7fe5a(0x7b)]);}}function a4_0x407d(){const _0x51acb8=['utf8','ivLength','slice','createDecipheriv','2150000ZCSWIW','keyLength','12eNbYxi','unknown','createHash','readFileSync','aes-256-cbc','randomBytes','477153EvTUXC','unlinkSync','885732GejqpE','hex','读取认证信息失败:\x20','saltLength','sha256','update','createCipheriv','128569CmyeXR','base64','from','userInfo','36964MCbVWu','username','join','17659215zCAIaQ','split','arch','algorithm','digest','final','crypto','pbkdf2Sync','保存认证信息失败:\x20','hostname','message','setAutoPadding','exports','88UiJAUr','删除认证文件失败:\x20','3020052FYxOEs','writeFileSync','加密失败:\x20'];a4_0x407d=function(){return _0x51acb8;};return a4_0x407d();}function generateDeviceKey(){const _0x544a2d=a4_0x4f371d,_0x187af1=require('os');let _0x2fb1b5=_0x544a2d(0x8a);try{_0x2fb1b5=_0x187af1[_0x544a2d(0x9b)]()[_0x544a2d(0x9d)]||_0x544a2d(0x8a);}catch(_0x2b1963){_0x2fb1b5=process.env.USER||process.env.LOGNAME||process.env.USERNAME||'unknown';}const _0x47fc21=[_0x187af1['platform'](),_0x187af1[_0x544a2d(0x73)](),_0x187af1[_0x544a2d(0x7a)](),_0x2fb1b5][_0x544a2d(0x9e)]('|');return crypto[_0x544a2d(0x8b)](_0x544a2d(0x95))[_0x544a2d(0x96)](_0x47fc21)[_0x544a2d(0x75)](_0x544a2d(0x92));}function saveAuth(_0x151075,_0x4ab171,_0x5a74f4){const _0x1184fa=a4_0x4f371d;try{const _0x15ef59=generateDeviceKey(),_0x3a2e39=_0x151075+'/'+_0x4ab171,_0x38277f=encrypt(_0x3a2e39,_0x15ef59);return fs[_0x1184fa(0x81)](_0x5a74f4,_0x38277f,{'mode':0x180}),!![];}catch(_0x253c2e){throw new Error(_0x1184fa(0x79)+_0x253c2e[_0x1184fa(0x7b)]);}}function loadAuth(_0x10b3b1){const _0x4c177d=a4_0x4f371d;try{if(!fs['existsSync'](_0x10b3b1))throw new Error('认证文件不存在');const _0x4f62eb=generateDeviceKey(),_0x3ab0c2=fs[_0x4c177d(0x8c)](_0x10b3b1,_0x4c177d(0x83)),_0x2997c1=decrypt(_0x3ab0c2,_0x4f62eb),[_0x17168d,_0x20d9e8]=_0x2997c1[_0x4c177d(0x72)]('/');if(!_0x17168d||!_0x20d9e8)throw new Error('认证数据格式错误');return{'username':_0x17168d,'password':_0x20d9e8};}catch(_0x3c7f92){throw new Error(_0x4c177d(0x93)+_0x3c7f92[_0x4c177d(0x7b)]);}}function deleteAuth(_0xe51d47){const _0x18f27b=a4_0x4f371d;try{fs['existsSync'](_0xe51d47)&&fs[_0x18f27b(0x90)](_0xe51d47);}catch(_0x36a73f){throw new Error(_0x18f27b(0x7f)+_0x36a73f[_0x18f27b(0x7b)]);}}module[a4_0x4f371d(0x7d)]={'encrypt':encrypt,'decrypt':decrypt,'saveAuth':saveAuth,'loadAuth':loadAuth,'deleteAuth':deleteAuth,'generateDeviceKey':generateDeviceKey};
1
+ function a4_0x1134(){const _0x5150ee=['base64','4575940XOSoxw','final','slice','message','algorithm','2489492KwiiRh','ivLength','aes-256-cbc','join','readFileSync','保存认证信息失败:\x20','utf8','username','18HWYwnK','删除认证文件失败:\x20','createDecipheriv','633KoIwaC','concat','2558rZIOMT','认证数据格式错误','saltLength','hex','43824830nxyBqz','加密失败:\x20','crypto','arch','unknown','existsSync','7084272WhcPog','认证文件不存在','randomBytes','keyLength','sha256','exports','9585513ntDZZm','writeFileSync','digest','userInfo','from','pbkdf2Sync','update','2616760YmdFzb','createCipheriv','6orzbyK','读取认证信息失败:\x20'];a4_0x1134=function(){return _0x5150ee;};return a4_0x1134();}const a4_0x27d5c1=a4_0x18a9;(function(_0x2f958e,_0xb31b15){const _0x290724=a4_0x18a9,_0x32b976=_0x2f958e();while(!![]){try{const _0x5e79d5=parseInt(_0x290724(0x9c))/0x1*(-parseInt(_0x290724(0x9e))/0x2)+parseInt(_0x290724(0x89))/0x3*(parseInt(_0x290724(0x91))/0x4)+-parseInt(_0x290724(0x8c))/0x5+-parseInt(_0x290724(0x7a))/0x6+-parseInt(_0x290724(0x80))/0x7+parseInt(_0x290724(0x87))/0x8*(-parseInt(_0x290724(0x99))/0x9)+parseInt(_0x290724(0x74))/0xa;if(_0x5e79d5===_0xb31b15)break;else _0x32b976['push'](_0x32b976['shift']());}catch(_0x15e276){_0x32b976['push'](_0x32b976['shift']());}}}(a4_0x1134,0xaa73d));const crypto=require(a4_0x27d5c1(0x76)),fs=require('fs'),path=require('path'),CRYPTO_CONFIG={'algorithm':a4_0x27d5c1(0x93),'keyLength':0x20,'ivLength':0x10,'saltLength':0x20};function deriveKey(_0x48c165,_0xe151ab){const _0xea21a3=a4_0x27d5c1;return crypto[_0xea21a3(0x85)](_0x48c165,_0xe151ab,0x186a0,CRYPTO_CONFIG[_0xea21a3(0x7d)],'sha512');}function a4_0x18a9(_0x3f8974,_0x56d52a){_0x3f8974=_0x3f8974-0x71;const _0x11347f=a4_0x1134();let _0x18a9f4=_0x11347f[_0x3f8974];return _0x18a9f4;}function generateSalt(){const _0x2c7ab0=a4_0x27d5c1;return crypto[_0x2c7ab0(0x7c)](CRYPTO_CONFIG['saltLength']);}function generateIV(){const _0x4f3ef3=a4_0x27d5c1;return crypto[_0x4f3ef3(0x7c)](CRYPTO_CONFIG[_0x4f3ef3(0x92)]);}function encrypt(_0x684ebb,_0x9afe75){const _0x46367d=a4_0x27d5c1;try{const _0x30131a=generateSalt(),_0x2ff4ef=generateIV(),_0xdc2f4f=deriveKey(_0x9afe75,_0x30131a),_0xc587a4=crypto[_0x46367d(0x88)](CRYPTO_CONFIG[_0x46367d(0x90)],_0xdc2f4f,_0x2ff4ef);_0xc587a4['setAutoPadding'](!![]);let _0x3dfc34=_0xc587a4[_0x46367d(0x86)](_0x684ebb,'utf8',_0x46367d(0x73));_0x3dfc34+=_0xc587a4['final']('hex');const _0x4092ed=Buffer[_0x46367d(0x9d)]([_0x30131a,_0x2ff4ef,Buffer[_0x46367d(0x84)](_0x3dfc34,_0x46367d(0x73))]);return _0x4092ed['toString']('base64');}catch(_0x47b63c){throw new Error(_0x46367d(0x75)+_0x47b63c[_0x46367d(0x8f)]);}}function decrypt(_0x7bf1b4,_0x330de4){const _0x64facc=a4_0x27d5c1;try{const _0xab9102=Buffer['from'](_0x7bf1b4,_0x64facc(0x8b)),_0x4c1f9d=_0xab9102[_0x64facc(0x8e)](0x0,CRYPTO_CONFIG[_0x64facc(0x72)]),_0x5b78a2=_0xab9102[_0x64facc(0x8e)](CRYPTO_CONFIG[_0x64facc(0x72)],CRYPTO_CONFIG[_0x64facc(0x72)]+CRYPTO_CONFIG['ivLength']),_0x14bfab=_0xab9102[_0x64facc(0x8e)](CRYPTO_CONFIG[_0x64facc(0x72)]+CRYPTO_CONFIG[_0x64facc(0x92)]),_0x5f3212=deriveKey(_0x330de4,_0x4c1f9d),_0x5ad0d4=crypto[_0x64facc(0x9b)](CRYPTO_CONFIG['algorithm'],_0x5f3212,_0x5b78a2);_0x5ad0d4['setAutoPadding'](!![]);let _0x47ca47=_0x5ad0d4['update'](_0x14bfab,null,_0x64facc(0x97));return _0x47ca47+=_0x5ad0d4[_0x64facc(0x8d)](_0x64facc(0x97)),_0x47ca47;}catch(_0x35f540){throw new Error('解密失败:\x20'+_0x35f540[_0x64facc(0x8f)]);}}function generateDeviceKey(){const _0x5486c0=a4_0x27d5c1,_0x3db0dd=require('os');let _0x476807='unknown';try{_0x476807=_0x3db0dd[_0x5486c0(0x83)]()[_0x5486c0(0x98)]||_0x5486c0(0x78);}catch(_0x40d311){_0x476807=process.env.USER||process.env.LOGNAME||process.env.USERNAME||_0x5486c0(0x78);}const _0x546980=[_0x3db0dd['platform'](),_0x3db0dd[_0x5486c0(0x77)](),_0x3db0dd['hostname'](),_0x476807][_0x5486c0(0x94)]('|');return crypto['createHash'](_0x5486c0(0x7e))[_0x5486c0(0x86)](_0x546980)[_0x5486c0(0x82)]('hex');}function saveAuth(_0xd33b37,_0x5c7d7e,_0x23dc28){const _0x40e1cc=a4_0x27d5c1;try{const _0x6611b3=generateDeviceKey(),_0x3e3d58=_0xd33b37+'/'+_0x5c7d7e,_0x4764f6=encrypt(_0x3e3d58,_0x6611b3);return fs[_0x40e1cc(0x81)](_0x23dc28,_0x4764f6,{'mode':0x180}),!![];}catch(_0x58b902){throw new Error(_0x40e1cc(0x96)+_0x58b902[_0x40e1cc(0x8f)]);}}function loadAuth(_0x26c4f5){const _0x17c70d=a4_0x27d5c1;try{if(!fs[_0x17c70d(0x79)](_0x26c4f5))throw new Error(_0x17c70d(0x7b));const _0x32fd85=generateDeviceKey(),_0x25aa1f=fs[_0x17c70d(0x95)](_0x26c4f5,_0x17c70d(0x97)),_0x47ae45=decrypt(_0x25aa1f,_0x32fd85),[_0x21f9c6,_0xb9cfd3]=_0x47ae45['split']('/');if(!_0x21f9c6||!_0xb9cfd3)throw new Error(_0x17c70d(0x71));return{'username':_0x21f9c6,'password':_0xb9cfd3};}catch(_0x48b18a){throw new Error(_0x17c70d(0x8a)+_0x48b18a[_0x17c70d(0x8f)]);}}function deleteAuth(_0x3399f0){const _0x438406=a4_0x27d5c1;try{fs[_0x438406(0x79)](_0x3399f0)&&fs['unlinkSync'](_0x3399f0);}catch(_0x4f61a7){throw new Error(_0x438406(0x9a)+_0x4f61a7[_0x438406(0x8f)]);}}module[a4_0x27d5c1(0x7f)]={'encrypt':encrypt,'decrypt':decrypt,'saveAuth':saveAuth,'loadAuth':loadAuth,'deleteAuth':deleteAuth,'generateDeviceKey':generateDeviceKey};
@@ -1 +1 @@
1
- const a5_0x5b2ad9=a5_0x5053;function a5_0x5053(_0x1818f6,_0x1dc9be){_0x1818f6=_0x1818f6-0xbf;const _0xa44d53=a5_0xa44d();let _0x5053a8=_0xa44d53[_0x1818f6];return _0x5053a8;}(function(_0x47e13c,_0x1f92a8){const _0x1f11c2=a5_0x5053,_0x3c7764=_0x47e13c();while(!![]){try{const _0x575b55=-parseInt(_0x1f11c2(0xcb))/0x1*(parseInt(_0x1f11c2(0xcc))/0x2)+-parseInt(_0x1f11c2(0xc3))/0x3*(-parseInt(_0x1f11c2(0xc2))/0x4)+parseInt(_0x1f11c2(0xcf))/0x5+parseInt(_0x1f11c2(0xc0))/0x6*(parseInt(_0x1f11c2(0xca))/0x7)+-parseInt(_0x1f11c2(0xd5))/0x8+-parseInt(_0x1f11c2(0xc5))/0x9+-parseInt(_0x1f11c2(0xcd))/0xa;if(_0x575b55===_0x1f92a8)break;else _0x3c7764['push'](_0x3c7764['shift']());}catch(_0x5de92d){_0x3c7764['push'](_0x3c7764['shift']());}}}(a5_0xa44d,0xc3eac));const inquirer=require('inquirer'),{logError}=require(a5_0x5b2ad9(0xbf));async function getCredentials(_0x315227=null){const _0x1d7012=a5_0x5b2ad9;try{let _0x2c9318=_0x315227;const _0x5dc042=[];!_0x2c9318&&_0x5dc042[_0x1d7012(0xd1)]({'type':_0x1d7012(0xc9),'name':_0x1d7012(0xce),'message':_0x1d7012(0xd2),'validate':_0x36b6e3=>{const _0x50d667=_0x1d7012;if(!_0x36b6e3||!_0x36b6e3[_0x50d667(0xd0)]())return _0x50d667(0xc7);return!![];}});_0x5dc042[_0x1d7012(0xd1)]({'type':_0x1d7012(0xd3),'name':'password','message':'请输入密码:','mask':'*','validate':_0x574562=>{const _0x22b7a1=_0x1d7012;if(!_0x574562||!_0x574562[_0x22b7a1(0xd0)]())return _0x22b7a1(0xc6);return!![];}});const _0x59c30b=await inquirer[_0x1d7012(0xc4)](_0x5dc042);_0x2c9318=_0x2c9318||_0x59c30b[_0x1d7012(0xce)][_0x1d7012(0xd0)]();const _0x4cb774=_0x59c30b['password'];return{'username':_0x2c9318,'password':_0x4cb774};}catch(_0x5636ee){_0x5636ee[_0x1d7012(0xc8)]?logError(_0x1d7012(0xd4)):logError(_0x1d7012(0xc1)+_0x5636ee['message']);throw _0x5636ee;}}async function interactiveAuth(){return await getCredentials();}module['exports']={'getCredentials':getCredentials,'interactiveAuth':interactiveAuth};function a5_0xa44d(){const _0x3037c7=['password','获取认证信息失败:\x20当前环境不支持交互式输入','10178696avjfvm','./utils','8689086ocsOlQ','获取认证信息失败:\x20','308YgQsju','62325TcGiiv','prompt','8256258xtEBqy','密码不能为空','账号不能为空','isTtyError','input','7gkYHeT','8qtgdxZ','123848kSiTAr','5322170BvrlqR','username','4859640FrjAcg','trim','push','请输入账号:'];a5_0xa44d=function(){return _0x3037c7;};return a5_0xa44d();}
1
+ function a5_0x52a1(_0x1d7737,_0x2131a5){_0x1d7737=_0x1d7737-0x1c7;const _0x4f8575=a5_0x4f85();let _0x52a1d9=_0x4f8575[_0x1d7737];return _0x52a1d9;}function a5_0x4f85(){const _0x187e1a=['exports','2113912DKqgiD','35FzfECd','2960YmuDoY','1732670QcUJIr','7157832aGrcQq','./utils','密码不能为空','获取认证信息失败:\x20','prompt','获取认证信息失败:\x20当前环境不支持交互式输入','4963005cxrEKv','message','trim','16242VebrFY','push','input','请输入密码:','4414518KvilrS','password','请输入账号:','inquirer','2533768GxtGUh'];a5_0x4f85=function(){return _0x187e1a;};return a5_0x4f85();}const a5_0x5319b5=a5_0x52a1;(function(_0x35e920,_0x47a6e7){const _0x3e70c7=a5_0x52a1,_0x4b1cdb=_0x35e920();while(!![]){try{const _0x4023f3=parseInt(_0x3e70c7(0x1ca))/0x1+-parseInt(_0x3e70c7(0x1c7))/0x2+-parseInt(_0x3e70c7(0x1d1))/0x3+-parseInt(_0x3e70c7(0x1cb))/0x4+parseInt(_0x3e70c7(0x1c9))/0x5*(parseInt(_0x3e70c7(0x1d4))/0x6)+parseInt(_0x3e70c7(0x1c8))/0x7*(parseInt(_0x3e70c7(0x1dc))/0x8)+parseInt(_0x3e70c7(0x1d8))/0x9;if(_0x4023f3===_0x47a6e7)break;else _0x4b1cdb['push'](_0x4b1cdb['shift']());}catch(_0x8a709d){_0x4b1cdb['push'](_0x4b1cdb['shift']());}}}(a5_0x4f85,0xddd1c));const inquirer=require(a5_0x5319b5(0x1db)),{logError}=require(a5_0x5319b5(0x1cc));async function getCredentials(_0x450855=null){const _0x36327c=a5_0x5319b5;try{let _0x196317=_0x450855;const _0x25650e=[];!_0x196317&&_0x25650e[_0x36327c(0x1d5)]({'type':_0x36327c(0x1d6),'name':'username','message':_0x36327c(0x1da),'validate':_0x974cac=>{const _0x35aa6b=_0x36327c;if(!_0x974cac||!_0x974cac[_0x35aa6b(0x1d3)]())return'账号不能为空';return!![];}});_0x25650e[_0x36327c(0x1d5)]({'type':_0x36327c(0x1d9),'name':'password','message':_0x36327c(0x1d7),'mask':'*','validate':_0x18c733=>{const _0x281b4c=_0x36327c;if(!_0x18c733||!_0x18c733[_0x281b4c(0x1d3)]())return _0x281b4c(0x1cd);return!![];}});const _0xf7adcb=await inquirer[_0x36327c(0x1cf)](_0x25650e);_0x196317=_0x196317||_0xf7adcb['username'][_0x36327c(0x1d3)]();const _0x3b6e83=_0xf7adcb[_0x36327c(0x1d9)];return{'username':_0x196317,'password':_0x3b6e83};}catch(_0x1f1c76){_0x1f1c76['isTtyError']?logError(_0x36327c(0x1d0)):logError(_0x36327c(0x1ce)+_0x1f1c76[_0x36327c(0x1d2)]);throw _0x1f1c76;}}async function interactiveAuth(){return await getCredentials();}module[a5_0x5319b5(0x1dd)]={'getCredentials':getCredentials,'interactiveAuth':interactiveAuth};
package/src/publish.js CHANGED
@@ -1 +1 @@
1
- const a6_0x3ff0cf=a6_0x5c6a;(function(_0x5bd9cb,_0x46f144){const _0x401f75=a6_0x5c6a,_0x1b68cc=_0x5bd9cb();while(!![]){try{const _0x292e0a=parseInt(_0x401f75(0x1c3))/0x1*(parseInt(_0x401f75(0x1bb))/0x2)+parseInt(_0x401f75(0x1b1))/0x3*(parseInt(_0x401f75(0x1cc))/0x4)+parseInt(_0x401f75(0x200))/0x5*(-parseInt(_0x401f75(0x1ba))/0x6)+parseInt(_0x401f75(0x1c8))/0x7+parseInt(_0x401f75(0x1a6))/0x8*(-parseInt(_0x401f75(0x1eb))/0x9)+-parseInt(_0x401f75(0x1e9))/0xa*(parseInt(_0x401f75(0x1ae))/0xb)+parseInt(_0x401f75(0x1f3))/0xc;if(_0x292e0a===_0x46f144)break;else _0x1b68cc['push'](_0x1b68cc['shift']());}catch(_0x34f7eb){_0x1b68cc['push'](_0x1b68cc['shift']());}}}(a6_0x3e65,0x3e455));const path=require(a6_0x3ff0cf(0x1b4)),os=require('os'),child_process=require(a6_0x3ff0cf(0x1ef)),axios=require(a6_0x3ff0cf(0x1a4)),inquirer=require(a6_0x3ff0cf(0x1e0)),{getApiHost}=require('./config'),{CONSTANTS,logInfo,logSuccess,logWarning,logError,executeCommand,fileExists,readFile,writeFile}=require(a6_0x3ff0cf(0x1d3)),{loadAuth}=require(a6_0x3ff0cf(0x1c2));function getGitInfo(){const _0x48b1c1=a6_0x3ff0cf;let _0x2a6c28=_0x48b1c1(0x202),_0x4476e7='unknown';try{_0x2a6c28=child_process[_0x48b1c1(0x1ea)](_0x48b1c1(0x1bc),{'cwd':process[_0x48b1c1(0x1e2)](),'stdio':'pipe'})['toString']()['trim']();}catch(_0x17ae83){}try{_0x4476e7=child_process['execSync'](_0x48b1c1(0x1e6),{'cwd':process[_0x48b1c1(0x1e2)](),'stdio':_0x48b1c1(0x1e7)})[_0x48b1c1(0x1d6)]()[_0x48b1c1(0x1b3)]();}catch(_0x8f1bbf){}return{'branch':_0x2a6c28,'gitUser':_0x4476e7};}function generateMetadataComment(_0x195a68){const _0x4807bf=a6_0x3ff0cf,{branch:_0x5cc6d5,gitUser:_0xdedbb0,hostname:_0x250acb,platform:_0x2b5bb9,publishTime:_0x3b0058,version:_0x58b0e0,cmdVersion:_0x3fe62f}=_0x195a68;return'/**\x20git-branch:\x20'+_0x5cc6d5+_0x4807bf(0x1a0)+_0x250acb+'\x20('+_0x2b5bb9+')\x20|\x20publish-time:\x20'+_0x3b0058+'\x20|\x20git-user:\x20'+_0xdedbb0+'\x20|\x20publish-version:\x20'+_0x58b0e0+_0x4807bf(0x1d4)+_0x3fe62f+_0x4807bf(0x19b);}function a6_0x5c6a(_0x380fb8,_0x4b74cc){_0x380fb8=_0x380fb8-0x194;const _0x3e6502=a6_0x3e65();let _0x5c6ae3=_0x3e6502[_0x380fb8];return _0x5c6ae3;}function parseComponentConfig(_0x9936d1){const _0x55d344=a6_0x3ff0cf,_0x58106f=_0x9936d1[_0x55d344(0x1b5)](/(window\[).+?(\.componentKey|.+]={)/img);if(!_0x58106f||!_0x58106f[_0x55d344(0x1a5)])throw new Error(_0x55d344(0x1fc));const _0x84cc8d={},_0x4cb586=_0x9936d1[_0x55d344(0x1b5)](/componentKey.+([{,]info:\s{0,}{)/img);if(!_0x4cb586||!_0x4cb586[_0x55d344(0x1a5)])throw new Error(_0x55d344(0x1d0));let _0x1a5dc8='{';const _0x155cc5=_0x9936d1[_0x55d344(0x197)](_0x4cb586[0x0])[0x1];for(let _0x2cabd0=0x0;_0x2cabd0<_0x155cc5[_0x55d344(0x1a5)];_0x2cabd0++){_0x1a5dc8+=_0x155cc5[_0x2cabd0];if(_0x155cc5[_0x2cabd0]==='}'){try{const _0x1d1f66=new Function(_0x55d344(0x1e4)+_0x1a5dc8)();Object['assign'](_0x84cc8d,_0x1d1f66),_0x84cc8d[_0x55d344(0x1a7)]={};}catch(_0x51a2f3){}break;}}const _0x3b4cff=_0x9936d1['match'](/componentKey.+([{,]settings:\s{0,}{)/img);if(!_0x3b4cff||!_0x3b4cff[_0x55d344(0x1a5)])throw new Error(_0x55d344(0x1c9));let _0x324d35='{';const _0x1f844c=_0x9936d1[_0x55d344(0x197)](_0x3b4cff[0x0])[0x1];for(let _0x2d134b=0x0;_0x2d134b<_0x1f844c[_0x55d344(0x1a5)];_0x2d134b++){_0x324d35+=_0x1f844c[_0x2d134b];if(_0x1f844c[_0x2d134b]==='}'){try{_0x84cc8d[_0x55d344(0x1a7)]=new Function(_0x55d344(0x1e4)+_0x324d35)();}catch(_0x57bd72){}break;}}return JSON[_0x55d344(0x1f7)](_0x84cc8d);}function executeBuild(_0xab3078){const _0x3c221a=a6_0x3ff0cf,_0x53a519=path[_0x3c221a(0x1b6)](_0xab3078,'yarn.lock');fileExists(_0x53a519)?executeCommand(_0x3c221a(0x1d9),_0xab3078):executeCommand('npm\x20run\x20build:production',_0xab3078);}function validateRequiredFiles(_0x4e7c1a){const _0x4113bd=a6_0x3ff0cf,_0x522b9c=path[_0x4113bd(0x1b6)](_0x4e7c1a,_0x4113bd(0x1ee)),_0x3dd63f=path[_0x4113bd(0x1b6)](_0x4e7c1a,_0x4113bd(0x1d1),_0x4113bd(0x1dc)),_0x1f2c11=path['join'](_0x4e7c1a,_0x4113bd(0x195)),_0x36c9db=path['join'](_0x4e7c1a,_0x4113bd(0x1b9));if(!fileExists(_0x1f2c11))throw new Error(_0x4113bd(0x1d5));if(!fileExists(_0x3dd63f))throw new Error(_0x4113bd(0x1cb));if(!fileExists(_0x522b9c))throw new Error('请在组件根目录添加一个README.md说明文件!');if(!fileExists(_0x36c9db))throw new Error('请在组件根目录为组件添加一个缩略图\x22thumbnail.png\x22文件!');return{'readmePath':_0x522b9c,'distPath':_0x3dd63f,'packageJsonPath':_0x1f2c11,'thumbnailPath':_0x36c9db};}const submitFun=function(_0x17185d,_0x421042){const _0x25630f=a6_0x3ff0cf;_0x421042[_0x25630f(0x1f5)]=_0x17185d||_0x25630f(0x206),axios['post'](getApiHost()+_0x25630f(0x1f9),_0x421042)[_0x25630f(0x1ca)](_0x475ba5=>{const _0x346247=_0x25630f;logSuccess(_0x475ba5[_0x346247(0x1f1)][_0x346247(0x1f5)]||_0x346247(0x1f6)),process[_0x346247(0x203)](0x0);})[_0x25630f(0x1ad)](_0x58c347=>{const _0x1b0c35=_0x25630f;if(_0x58c347&&_0x58c347[_0x1b0c35(0x1ff)]){const _0x4f5d66=_0x58c347[_0x1b0c35(0x1ff)][_0x1b0c35(0x1af)],_0x14f91a=_0x58c347[_0x1b0c35(0x1ff)]['data']&&(_0x58c347['response'][_0x1b0c35(0x1f1)][_0x1b0c35(0x1f5)]||_0x58c347[_0x1b0c35(0x1ff)][_0x1b0c35(0x1f1)]['msg'])||'';logError(_0x1b0c35(0x1ce)+_0x4f5d66+_0x1b0c35(0x1f8)+(_0x14f91a||_0x58c347['message']));}else _0x58c347&&_0x58c347['request']?logError('网络连接失败:\x20无法连接到服务器'):logError(_0x1b0c35(0x1e3)+(_0x58c347[_0x1b0c35(0x1f5)]||_0x1b0c35(0x204)));process['exit'](0x1);});};module[a6_0x3ff0cf(0x1da)]=_0x353591=>{const _0x10013b=a6_0x3ff0cf,_0x7fcaa5=path[_0x10013b(0x1b6)](__dirname,_0x10013b(0x1dd));!fileExists(_0x7fcaa5)&&(logError('未检测到认证信息,请先执行登录操作'),process[_0x10013b(0x203)](0x1));let _0x588ea6,_0x400d85;try{logInfo(_0x10013b(0x1be));const _0x38dbd4=loadAuth(_0x7fcaa5);_0x588ea6=_0x38dbd4[_0x10013b(0x1e5)],_0x400d85=_0x38dbd4[_0x10013b(0x19d)],logSuccess(_0x10013b(0x19f));}catch(_0x1a0acb){logError(_0x10013b(0x1db)+_0x1a0acb[_0x10013b(0x1f5)]),process[_0x10013b(0x203)](0x1);}logInfo(_0x10013b(0x196)),axios[_0x10013b(0x1a8)](getApiHost()+_0x10013b(0x1ab),{'username':_0x588ea6,'password':_0x400d85})[_0x10013b(0x1ca)](async _0x80d6c=>{const _0x10553e=_0x10013b;if(_0x80d6c[_0x10553e(0x1f1)][_0x10553e(0x1af)]){logSuccess(_0x10553e(0x1df));const _0x3ee9d2=path[_0x10553e(0x1d2)]('./');logInfo(_0x10553e(0x1de));try{executeBuild(_0x3ee9d2),logSuccess(_0x10553e(0x1bf));}catch(_0x1555e4){logError(_0x10553e(0x1a2)+_0x1555e4[_0x10553e(0x1f5)]),process[_0x10553e(0x203)](0x1);}logInfo(_0x10553e(0x1cd));let _0x54d800;try{_0x54d800=validateRequiredFiles(_0x3ee9d2),logSuccess(_0x10553e(0x1ac));}catch(_0x53c5da){logError(_0x53c5da[_0x10553e(0x1f5)]),process[_0x10553e(0x203)](0x1);}logInfo(_0x10553e(0x1bd));const _0xd23110=JSON[_0x10553e(0x1f2)](readFile(path[_0x10553e(0x1b6)](__dirname,_0x10553e(0x1d7)))),{version:_0x151e8c}=_0xd23110;logInfo(_0x10553e(0x1aa));const _0x3e38bf=getGitInfo(),_0x232083=new Date()[_0x10553e(0x19a)](),_0x58825a=readFile(_0x54d800['distPath']),_0x13e09c=generateMetadataComment({'branch':_0x3e38bf[_0x10553e(0x1a3)],'gitUser':_0x3e38bf['gitUser'],'hostname':os[_0x10553e(0x1fe)](),'platform':os['platform'](),'publishTime':_0x232083,'version':_0x353591||_0x10553e(0x1fa),'cmdVersion':_0x151e8c})+_0x58825a;logSuccess(_0x10553e(0x1fb)),logInfo(_0x10553e(0x1b2));const _0x3cb18c={'username':_0x588ea6,'cmd_version':_0x151e8c,'hostname':os[_0x10553e(0x1fe)](),'platform':os[_0x10553e(0x1b0)](),'package_version':_0x353591||0x0,'package_content':_0x13e09c,'readme_content':readFile(_0x54d800[_0x10553e(0x1f4)])};try{logInfo(_0x10553e(0x1d8)),_0x3cb18c['component_config_content']=parseComponentConfig(_0x13e09c),logSuccess('组件配置解析完成');}catch(_0x55bb9e){logError(_0x55bb9e['message']),process[_0x10553e(0x203)](0x1);}logInfo(_0x10553e(0x19c));const _0x2def3b=readFile(_0x54d800['thumbnailPath'],_0x10553e(0x1c5));_0x3cb18c['thumbnail_base64']=Buffer[_0x10553e(0x194)](_0x2def3b,'binary')[_0x10553e(0x1d6)]('base64'),logSuccess('缩略图处理完成'),logWarning(_0x10553e(0x199)),logWarning(_0x10553e(0x1c4)),logWarning(_0x10553e(0x1c1)),logWarning(_0x10553e(0x1b8)),logWarning('\x20\x203.\x20已确认版本号和发布信息正确'),logWarning('\x20\x204.\x20已了解发布后的影响范围'),logWarning(_0x10553e(0x1a9)),await new Promise(_0x213ab9=>{let _0x466f7c=0xa;const _0x3f4c6a=setInterval(()=>{const _0x26e58d=a6_0x5c6a;process[_0x26e58d(0x1c6)][_0x26e58d(0x1b7)](_0x26e58d(0x1f0)+_0x466f7c+'\x20秒...\x20\x20'),_0x466f7c--,_0x466f7c<0x0&&(clearInterval(_0x3f4c6a),process[_0x26e58d(0x1c6)]['write']('\x0d\x0a'),_0x213ab9());},0x3e8);});const {confirmed:_0x56c8ec}=await inquirer[_0x10553e(0x1e8)]([{'type':_0x10553e(0x1fd),'name':_0x10553e(0x1c0),'message':_0x10553e(0x1c7),'default':![]}]);!_0x56c8ec&&(logInfo(_0x10553e(0x1e1)),process[_0x10553e(0x203)](0x0));const {message:_0x24f50b}=await inquirer[_0x10553e(0x1e8)]([{'type':_0x10553e(0x1ec),'name':_0x10553e(0x1f5),'message':_0x10553e(0x198),'default':'no\x20message'}]);logInfo('正在提交发布请求...'),submitFun(_0x24f50b||'no\x20message',_0x3cb18c);}else logError('授权失败:\x20'+(_0x80d6c['data'][_0x10553e(0x1f5)]||_0x10553e(0x204))),process[_0x10553e(0x203)](0x1);})[_0x10013b(0x1ad)](_0xb13866=>{const _0x509b55=_0x10013b;if(_0xb13866&&_0xb13866['response']){const _0x3293e8=_0xb13866['response']['status'];if(_0x3293e8===0x191||_0x3293e8===0x193)logError(_0x509b55(0x19e)+_0x3293e8+_0x509b55(0x201));else{const _0x4c094c=_0xb13866[_0x509b55(0x1ff)][_0x509b55(0x1f1)]&&(_0xb13866[_0x509b55(0x1ff)][_0x509b55(0x1f1)][_0x509b55(0x1f5)]||_0xb13866[_0x509b55(0x1ff)]['data']['msg'])||'';logError(_0x509b55(0x1a1)+_0x3293e8+'):\x20'+(_0x4c094c||_0xb13866['message']));}}else _0xb13866&&_0xb13866[_0x509b55(0x1ed)]?logError(_0x509b55(0x1cf)):logError(_0x509b55(0x205)+(_0xb13866?_0xb13866[_0x509b55(0x1f5)]:_0x509b55(0x204)));process['exit'](0x1);});};function a6_0x3e65(){const _0x1224ac=['post','\x20\x205.\x20发布成功后请立即通知相关人员进行测试和验证','正在注入组件追溯信息...','/api/auth','文件验证通过','catch','88NMjPIv','status','platform','564WTPdEO','正在准备发布数据...','trim','path','match','join','write','\x20\x202.\x20已检查构建产物完整性','thumbnail.png','12cWyMmL','4FkRVzI','git\x20rev-parse\x20--abbrev-ref\x20HEAD','正在读取包信息...','正在加载认证信息...','项目构建完成','confirmed','\x20\x201.\x20已充分测试组件各项功能','./crypto-utils','214685eogsNL','发布错误可能导致线上应用产生严重生产故障,请务必确保:','binary','stdout','我已充分了解以上可能存在的严重风险,确认继续发布操作?','2063705ASleRS','暴露的配置信息中缺少\x22settings\x22!','then','组件发布失败!根目录缺少\x27dist/index.js\x27文件!','820VGhvZv','正在验证发布所需文件...','发布失败\x20(','网络连接失败:\x20无法连接到服务器或服务器无响应','暴露的配置信息中缺少\x22info\x22!','dist','resolve','./utils','\x20|\x20cmd-version:\x20','组件发布失败!根目录缺少\x27package.json\x27文件!','toString','../package.json','正在解析组件配置信息...','yarn\x20build:production','exports','读取认证信息失败:\x20','index.js','../.auth','正在执行项目构建...','服务器授权成功','inquirer','发布操作已取消','cwd','发布失败:\x20','return\x20','username','git\x20config\x20user.name','pipe','prompt','539940DTdemh','execSync','9lRaYDH','input','request','README.md','child_process','\x0d倒计时\x20','data','parse','4471524UGqTiA','readmePath','message','组件发布成功','stringify','):\x20','/api/file/publish','0.0.0','追溯信息注入完成','请在组件入口文件中添加\x22window[props.componentKey]\x22以暴露组件的配置信息!','confirm','hostname','response','727770IPEafl','):\x20认证信息无效或无权限','unknown','exit','未知错误','操作失败:\x20','no\x20message','from','package.json','正在请求服务器授权...','split','请输入此次组件发布的信息:','警告:您即将进行组件发布操作,此操作不可逆,请谨慎操作','toISOString','\x20**/\x0a','正在处理缩略图...','password','授权失败\x20(','认证信息加载成功','\x20|\x20device:\x20','请求失败\x20(','项目构建失败:\x20','branch','axios','length','1257848ccPZBt','defaultSetting'];a6_0x3e65=function(){return _0x1224ac;};return a6_0x3e65();}
1
+ const a6_0xd6ef64=a6_0x48fa;(function(_0x3243c5,_0x1a9be9){const _0x588d7f=a6_0x48fa,_0x5bc8bf=_0x3243c5();while(!![]){try{const _0x21781e=parseInt(_0x588d7f(0x142))/0x1*(-parseInt(_0x588d7f(0x155))/0x2)+parseInt(_0x588d7f(0x192))/0x3*(-parseInt(_0x588d7f(0x19b))/0x4)+parseInt(_0x588d7f(0x15e))/0x5*(parseInt(_0x588d7f(0x154))/0x6)+parseInt(_0x588d7f(0x181))/0x7*(parseInt(_0x588d7f(0x17e))/0x8)+-parseInt(_0x588d7f(0x182))/0x9+parseInt(_0x588d7f(0x16c))/0xa+parseInt(_0x588d7f(0x16e))/0xb;if(_0x21781e===_0x1a9be9)break;else _0x5bc8bf['push'](_0x5bc8bf['shift']());}catch(_0x2bc42b){_0x5bc8bf['push'](_0x5bc8bf['shift']());}}}(a6_0x1ac7,0x83b4f));const path=require('path'),os=require('os'),child_process=require('child_process'),axios=require(a6_0xd6ef64(0x14b)),inquirer=require(a6_0xd6ef64(0x144)),{getApiHost}=require(a6_0xd6ef64(0x174)),{CONSTANTS,logInfo,logSuccess,logWarning,logError,executeCommand,fileExists,readFile,writeFile}=require(a6_0xd6ef64(0x16f)),{loadAuth}=require(a6_0xd6ef64(0x17d));function getGitInfo(){const _0x2eb3c1=a6_0xd6ef64;let _0x34185e=_0x2eb3c1(0x198),_0x14a338=_0x2eb3c1(0x198);try{_0x34185e=child_process['execSync']('git\x20rev-parse\x20--abbrev-ref\x20HEAD',{'cwd':process['cwd'](),'stdio':_0x2eb3c1(0x161)})['toString']()[_0x2eb3c1(0x150)]();}catch(_0x5e26d2){}try{_0x14a338=child_process[_0x2eb3c1(0x13b)]('git\x20config\x20user.name',{'cwd':process[_0x2eb3c1(0x12d)](),'stdio':_0x2eb3c1(0x161)})[_0x2eb3c1(0x176)]()[_0x2eb3c1(0x150)]();}catch(_0x49da89){}return{'branch':_0x34185e,'gitUser':_0x14a338};}function generateMetadataComment(_0x668dd5){const _0x4a20c2=a6_0xd6ef64,{branch:_0x77871f,gitUser:_0xabb62,hostname:_0x361f24,platform:_0x1836b1,publishTime:_0x20790b,version:_0x372385,cmdVersion:_0x55b3a5}=_0x668dd5;return _0x4a20c2(0x18e)+_0x77871f+_0x4a20c2(0x134)+_0x361f24+'\x20('+_0x1836b1+_0x4a20c2(0x133)+_0x20790b+_0x4a20c2(0x141)+_0xabb62+_0x4a20c2(0x12c)+_0x372385+_0x4a20c2(0x13e)+_0x55b3a5+'\x20**/\x0a';}function parseComponentConfig(_0x51a1ba){const _0x51f93d=a6_0xd6ef64,_0x406999=_0x51a1ba[_0x51f93d(0x14a)](/(window\[).+?(\.componentKey|.+]={)/img);if(!_0x406999||!_0x406999[_0x51f93d(0x13c)])throw new Error(_0x51f93d(0x147));const _0x157ae1={},_0x1ff5d9=_0x51a1ba[_0x51f93d(0x14a)](/componentKey.+([{,]info:\s{0,}{)/img);if(!_0x1ff5d9||!_0x1ff5d9['length'])throw new Error('暴露的配置信息中缺少\x22info\x22!');let _0x3dc047='{';const _0x12159d=_0x51a1ba[_0x51f93d(0x170)](_0x1ff5d9[0x0])[0x1];for(let _0x4670f3=0x0;_0x4670f3<_0x12159d[_0x51f93d(0x13c)];_0x4670f3++){_0x3dc047+=_0x12159d[_0x4670f3];if(_0x12159d[_0x4670f3]==='}'){try{const _0x35c2c2=new Function(_0x51f93d(0x124)+_0x3dc047)();Object[_0x51f93d(0x189)](_0x157ae1,_0x35c2c2),_0x157ae1['defaultSetting']={};}catch(_0x25dc15){}break;}}const _0xd1d744=_0x51a1ba[_0x51f93d(0x14a)](/componentKey.+([{,]settings:\s{0,}{)/img);if(!_0xd1d744||!_0xd1d744[_0x51f93d(0x13c)])throw new Error(_0x51f93d(0x15f));let _0x220186='{';const _0x44a40e=_0x51a1ba[_0x51f93d(0x170)](_0xd1d744[0x0])[0x1];for(let _0x3746a6=0x0;_0x3746a6<_0x44a40e['length'];_0x3746a6++){_0x220186+=_0x44a40e[_0x3746a6];if(_0x44a40e[_0x3746a6]==='}'){try{_0x157ae1[_0x51f93d(0x125)]=new Function(_0x51f93d(0x124)+_0x220186)();}catch(_0x39cb8d){}break;}}return JSON['stringify'](_0x157ae1);}function getNodeEnv(_0x55c786){const _0x4c44bc=a6_0xd6ef64;if(_0x55c786===_0x4c44bc(0x172))return'test';if(_0x55c786===_0x4c44bc(0x157))return _0x4c44bc(0x13f);return _0x4c44bc(0x162);}function executeBuild(_0x3d96bc,_0x439ecb){const _0x500dbc=a6_0xd6ef64,_0x573598=getNodeEnv(_0x439ecb);process.env.NODE_ENV=_0x573598,logInfo(_0x500dbc(0x185)+_0x573598);const _0x32ab08=path[_0x500dbc(0x186)](_0x3d96bc,'yarn.lock');fileExists(_0x32ab08)?executeCommand(_0x500dbc(0x13a)+_0x573598,_0x3d96bc):executeCommand('npm\x20run\x20build:'+_0x573598,_0x3d96bc);}function validateRequiredFiles(_0x31c097){const _0x16dfbf=a6_0xd6ef64,_0x4fdc52=path[_0x16dfbf(0x186)](_0x31c097,_0x16dfbf(0x135)),_0xc3677f=path[_0x16dfbf(0x186)](_0x31c097,'dist',_0x16dfbf(0x167)),_0x33dc75=path['join'](_0x31c097,_0x16dfbf(0x166)),_0x11b540=path[_0x16dfbf(0x186)](_0x31c097,_0x16dfbf(0x15c));if(!fileExists(_0x33dc75))throw new Error(_0x16dfbf(0x190));if(!fileExists(_0xc3677f))throw new Error(_0x16dfbf(0x177));if(!fileExists(_0x4fdc52))throw new Error(_0x16dfbf(0x158));if(!fileExists(_0x11b540))throw new Error(_0x16dfbf(0x165));return{'readmePath':_0x4fdc52,'distPath':_0xc3677f,'packageJsonPath':_0x33dc75,'thumbnailPath':_0x11b540};}function a6_0x1ac7(){const _0x36e5e7=['prompt','resolve','组件发布成功','platform','/**\x20git-branch:\x20','正在提交发布请求...','组件发布失败!根目录缺少\x27package.json\x27文件!','未检测到认证信息,请先执行登录操作','9rNmnRK','缩略图处理完成','追溯信息注入完成','gitUser','password','binary','unknown','请输入此次组件发布的信息:','parse','989724HkKmKj','return\x20','defaultSetting','thumbnail_base64','正在验证发布所需文件...','then','distPath','no\x20message','request','\x20|\x20publish-version:\x20','cwd','status','input','../.auth','):\x20','confirmed',')\x20|\x20publish-time:\x20','\x20|\x20device:\x20','README.md','component_config_content','toISOString','message','正在加载认证信息...','yarn\x20build:','execSync','length','/api/file/publish','\x20|\x20cmd-version:\x20','development','发布失败\x20(','\x20|\x20git-user:\x20','52GeRseS','发布错误可能导致线上应用产生严重生产故障,请务必确保:','inquirer','操作失败:\x20','data','请在组件入口文件中添加\x22window[props.componentKey]\x22以暴露组件的配置信息!','文件验证通过','exports','match','axios','\x20\x201.\x20已充分测试组件各项功能','我已充分了解以上可能存在的严重风险,确认继续发布操作?','读取认证信息失败:\x20','response','trim','from','username','exit','59442odqVAs','39362HgptOY','\x20\x202.\x20已检查构建产物完整性','dev','请在组件根目录添加一个README.md说明文件!','发布失败:\x20','../package.json','\x0d倒计时\x20','thumbnail.png','stdout','490lsMCva','暴露的配置信息中缺少\x22settings\x22!','confirm','pipe','production','项目构建完成','组件配置解析完成','请在组件根目录为组件添加一个缩略图\x22thumbnail.png\x22文件!','package.json','index.js','post','\x20秒...\x20\x20','catch','hostname','5548230JKwSOc','网络连接失败:\x20无法连接到服务器或服务器无响应','7564095vrzDmS','./utils','split','服务器授权成功','test','write','./config','正在请求服务器授权...','toString','组件发布失败!根目录缺少\x27dist/index.js\x27文件!','警告:您即将进行组件发布操作,此操作不可逆,请谨慎操作','\x20\x203.\x20已确认版本号和发布信息正确','正在读取包信息...','msg','正在处理缩略图...','./crypto-utils','8216wLdcUG','0.0.0','\x20\x204.\x20已了解发布后的影响范围','3171dKnOcZ','3360681bPbolC','正在注入组件追溯信息...','未知错误','NODE_ENV\x20设置为:\x20','join','正在准备发布数据...','网络连接失败:\x20无法连接到服务器','assign'];a6_0x1ac7=function(){return _0x36e5e7;};return a6_0x1ac7();}function a6_0x48fa(_0x3755be,_0x542b87){_0x3755be=_0x3755be-0x124;const _0x1ac7e3=a6_0x1ac7();let _0x48fabb=_0x1ac7e3[_0x3755be];return _0x48fabb;}const submitFun=function(_0x79c781,_0x453551){const _0x2e6cfe=a6_0xd6ef64;_0x453551[_0x2e6cfe(0x138)]=_0x79c781||_0x2e6cfe(0x12a),axios[_0x2e6cfe(0x168)](getApiHost()+_0x2e6cfe(0x13d),_0x453551)[_0x2e6cfe(0x128)](_0x24cf1c=>{const _0x4cc99c=_0x2e6cfe;logSuccess(_0x24cf1c['data'][_0x4cc99c(0x138)]||_0x4cc99c(0x18c)),process['exit'](0x0);})[_0x2e6cfe(0x16a)](_0x26fa34=>{const _0x1705da=_0x2e6cfe;if(_0x26fa34&&_0x26fa34[_0x1705da(0x14f)]){const _0x535a02=_0x26fa34['response'][_0x1705da(0x12e)],_0x1e6b01=_0x26fa34['response'][_0x1705da(0x146)]&&(_0x26fa34['response'][_0x1705da(0x146)][_0x1705da(0x138)]||_0x26fa34[_0x1705da(0x14f)][_0x1705da(0x146)][_0x1705da(0x17b)])||'';logError(_0x1705da(0x140)+_0x535a02+_0x1705da(0x131)+(_0x1e6b01||_0x26fa34[_0x1705da(0x138)]));}else _0x26fa34&&_0x26fa34['request']?logError(_0x1705da(0x188)):logError(_0x1705da(0x159)+(_0x26fa34['message']||'未知错误'));process[_0x1705da(0x153)](0x1);});};module[a6_0xd6ef64(0x149)]=_0x22aa5e=>{const _0x241a6b=a6_0xd6ef64,_0x39ac94=path[_0x241a6b(0x186)](__dirname,_0x241a6b(0x130));!fileExists(_0x39ac94)&&(logError(_0x241a6b(0x191)),process[_0x241a6b(0x153)](0x1));let _0x2eb4a4,_0x2d8eb9;try{logInfo(_0x241a6b(0x139));const _0x2092e2=loadAuth(_0x39ac94);_0x2eb4a4=_0x2092e2[_0x241a6b(0x152)],_0x2d8eb9=_0x2092e2[_0x241a6b(0x196)],logSuccess('认证信息加载成功');}catch(_0x288a74){logError(_0x241a6b(0x14e)+_0x288a74['message']),process['exit'](0x1);}logInfo(_0x241a6b(0x175)),axios['post'](getApiHost()+'/api/auth',{'username':_0x2eb4a4,'password':_0x2d8eb9})[_0x241a6b(0x128)](async _0x504f2b=>{const _0x512f21=_0x241a6b;if(_0x504f2b['data'][_0x512f21(0x12e)]){logSuccess(_0x512f21(0x171));const _0x21e783=path[_0x512f21(0x18b)]('./');logInfo('正在执行项目构建...');try{executeBuild(_0x21e783,_0x22aa5e),logSuccess(_0x512f21(0x163));}catch(_0xe2daed){logError('项目构建失败:\x20'+_0xe2daed[_0x512f21(0x138)]),process['exit'](0x1);}logInfo(_0x512f21(0x127));let _0x25831d;try{_0x25831d=validateRequiredFiles(_0x21e783),logSuccess(_0x512f21(0x148));}catch(_0x3c3622){logError(_0x3c3622['message']),process[_0x512f21(0x153)](0x1);}logInfo(_0x512f21(0x17a));const _0x5eddea=JSON[_0x512f21(0x19a)](readFile(path[_0x512f21(0x186)](__dirname,_0x512f21(0x15a)))),{version:_0x368cb3}=_0x5eddea;logInfo(_0x512f21(0x183));const _0xe851a6=getGitInfo(),_0x50b292=new Date()[_0x512f21(0x137)](),_0x56fbdf=readFile(_0x25831d[_0x512f21(0x129)]),_0xb9f81e=generateMetadataComment({'branch':_0xe851a6['branch'],'gitUser':_0xe851a6[_0x512f21(0x195)],'hostname':os[_0x512f21(0x16b)](),'platform':os[_0x512f21(0x18d)](),'publishTime':_0x50b292,'version':_0x22aa5e||_0x512f21(0x17f),'cmdVersion':_0x368cb3})+_0x56fbdf;logSuccess(_0x512f21(0x194)),logInfo(_0x512f21(0x187));const _0x1ca2bd={'username':_0x2eb4a4,'cmd_version':_0x368cb3,'hostname':os[_0x512f21(0x16b)](),'platform':os[_0x512f21(0x18d)](),'package_version':_0x22aa5e||0x0,'package_content':_0xb9f81e,'readme_content':readFile(_0x25831d['readmePath'])};try{logInfo('正在解析组件配置信息...'),_0x1ca2bd[_0x512f21(0x136)]=parseComponentConfig(_0xb9f81e),logSuccess(_0x512f21(0x164));}catch(_0x5509b6){logError(_0x5509b6['message']),process['exit'](0x1);}logInfo(_0x512f21(0x17c));const _0x5620b2=readFile(_0x25831d['thumbnailPath'],_0x512f21(0x197));_0x1ca2bd[_0x512f21(0x126)]=Buffer[_0x512f21(0x151)](_0x5620b2,_0x512f21(0x197))[_0x512f21(0x176)]('base64'),logSuccess(_0x512f21(0x193)),logWarning(_0x512f21(0x178)),logWarning(_0x512f21(0x143)),logWarning(_0x512f21(0x14c)),logWarning(_0x512f21(0x156)),logWarning(_0x512f21(0x179)),logWarning(_0x512f21(0x180)),logWarning('\x20\x205.\x20发布成功后请立即通知相关人员进行测试和验证'),await new Promise(_0x120f67=>{let _0xf2ebda=0xa;const _0x58382a=setInterval(()=>{const _0x540c61=a6_0x48fa;process[_0x540c61(0x15d)][_0x540c61(0x173)](_0x540c61(0x15b)+_0xf2ebda+_0x540c61(0x169)),_0xf2ebda--,_0xf2ebda<0x0&&(clearInterval(_0x58382a),process[_0x540c61(0x15d)][_0x540c61(0x173)]('\x0d\x0a'),_0x120f67());},0x3e8);});const {confirmed:_0x4b91e7}=await inquirer[_0x512f21(0x18a)]([{'type':_0x512f21(0x160),'name':_0x512f21(0x132),'message':_0x512f21(0x14d),'default':![]}]);!_0x4b91e7&&(logInfo('发布操作已取消'),process[_0x512f21(0x153)](0x0));const {message:_0x3b8f7f}=await inquirer[_0x512f21(0x18a)]([{'type':_0x512f21(0x12f),'name':_0x512f21(0x138),'message':_0x512f21(0x199),'default':_0x512f21(0x12a)}]);logInfo(_0x512f21(0x18f)),submitFun(_0x3b8f7f||_0x512f21(0x12a),_0x1ca2bd);}else logError('授权失败:\x20'+(_0x504f2b[_0x512f21(0x146)]['message']||_0x512f21(0x184))),process[_0x512f21(0x153)](0x1);})[_0x241a6b(0x16a)](_0x2b9352=>{const _0x5b8f54=_0x241a6b;if(_0x2b9352&&_0x2b9352[_0x5b8f54(0x14f)]){const _0x22225e=_0x2b9352['response']['status'];if(_0x22225e===0x191||_0x22225e===0x193)logError('授权失败\x20('+_0x22225e+'):\x20认证信息无效或无权限');else{const _0xa9b131=_0x2b9352[_0x5b8f54(0x14f)]['data']&&(_0x2b9352['response'][_0x5b8f54(0x146)][_0x5b8f54(0x138)]||_0x2b9352[_0x5b8f54(0x14f)]['data'][_0x5b8f54(0x17b)])||'';logError('请求失败\x20('+_0x22225e+_0x5b8f54(0x131)+(_0xa9b131||_0x2b9352[_0x5b8f54(0x138)]));}}else _0x2b9352&&_0x2b9352[_0x5b8f54(0x12b)]?logError(_0x5b8f54(0x16d)):logError(_0x5b8f54(0x145)+(_0x2b9352?_0x2b9352[_0x5b8f54(0x138)]:'未知错误'));process[_0x5b8f54(0x153)](0x1);});};
package/src/push.js CHANGED
@@ -1 +1 @@
1
- const a7_0x522780=a7_0x321c;function a7_0x321c(_0x29e3ad,_0x2efde6){_0x29e3ad=_0x29e3ad-0x15a;const _0x1776f7=a7_0x1776();let _0x321cc7=_0x1776f7[_0x29e3ad];return _0x321cc7;}(function(_0x596161,_0x3f01b5){const _0x426d0c=a7_0x321c,_0x31be72=_0x596161();while(!![]){try{const _0x215dc6=parseInt(_0x426d0c(0x1dd))/0x1+-parseInt(_0x426d0c(0x1cb))/0x2+parseInt(_0x426d0c(0x16c))/0x3*(-parseInt(_0x426d0c(0x1d6))/0x4)+parseInt(_0x426d0c(0x189))/0x5+-parseInt(_0x426d0c(0x180))/0x6*(-parseInt(_0x426d0c(0x15a))/0x7)+parseInt(_0x426d0c(0x1a9))/0x8*(parseInt(_0x426d0c(0x1c1))/0x9)+-parseInt(_0x426d0c(0x164))/0xa*(parseInt(_0x426d0c(0x1af))/0xb);if(_0x215dc6===_0x3f01b5)break;else _0x31be72['push'](_0x31be72['shift']());}catch(_0x39d10d){_0x31be72['push'](_0x31be72['shift']());}}}(a7_0x1776,0x9396f));const os=require('os'),path=require(a7_0x522780(0x1db)),fs=require('fs'),inquirer=require(a7_0x522780(0x1c4)),{CopyFolder,DeleteDirAllFile}=require(a7_0x522780(0x1d0)),{GIT_TEMP_JAVA,getApiHost}=require('./config'),axios=require(a7_0x522780(0x19c)),{CONSTANTS,logInfo,logSuccess,logWarning,logError,executeCommand,deleteFolderRecursive,fileExists,readFile,writeFile,createDir,isViteProject,validateConfig}=require(a7_0x522780(0x1d0)),{loadAuth}=require(a7_0x522780(0x182));function a7_0x1776(){const _0x4979d4=['4dFxxJP','data','临时工作目录已清理:\x20','username','appIdentifier','path','MAX_BUFFER_SIZE','151512dzYvAk','response','21ictERl','已生成\x20index.html\x20文件','exports','请选择要执行的打包命令:','split','代码提交跳过:\x20没有需要提交的变更','已生成\x20','SYNC_DELAY','uncaughtException','代码同步完成','792460jYGjrM','未知错误','正在创建模板目录...','scripts','未找到\x20environment\x20配置,将使用默认分支','代码提交成功','正在请求服务器授权...','status','650409PoncJt','includes','prompt','正在清理临时工作目录...','请选择环境:','正在提交代码变更...','git\x20add\x20.','selectedScript','清理临时目录失败:\x20','index','正在准备临时工作目录...','password','isValid','/api/auth','构建产物目录不存在,请检查构建输出配置','项目构建失败:\x20','授权失败\x20(','keys','npm\x20install','jjb.config.json\x20读取成功','1386402mVhOkk','正在复制构建产物到目标目录...','./crypto-utils','git\x20pull','代码推送完成','正在克隆\x20Git\x20仓库...','message','missingFields','git\x20push','1607760Zhiqac','package.json\x20读取成功','tmpdir','environment','git\x20commit\x20-m\x20\x22','force','javaGit','then','node_modules','已选择打包命令:\x20','正在清理目标目录...','join','javaGitName','index.html','request','package.json','请输入提交信息:','../.auth','配置文件中缺少必要字段:\x20','axios','no\x20message','length','DEFAULT_BRANCH','filter','exit','正在推送代码到远程仓库...','map','object','yarn.lock','正在添加文件变更...','git\x20checkout\x20','.html','248728sDrRIA','检测到已存在的仓库,正在强制清理...','list','git\x20clone\x20','未找到\x20package.json\x20文件','trim','66QhLVSO','操作失败:\x20','读取认证信息失败:\x20','npm','envType','正在同步\x20Git\x20仓库最新代码...','检测到未安装项目依赖','npm\x20run\x20','toString','正在检查项目配置文件...','),请稍候...','解析\x20jjb.config.json\x20失败:\x20','未找到打包相关的命令,请检查\x20package.json\x20中的\x20scripts\x20配置','正在同步远程仓库...','javaGitBranch','TEMPLATES_PATH','readFileSync','请求失败\x20(','342NQrXbZ','项目依赖安装完成','catch','inquirer','分支切换完成','some','已选择环境:\x20','input','post','now','2101834lETmKy','Git\x20仓库克隆完成','正在安装项目依赖\x20(','parse','解析\x20package.json\x20失败:\x20','./utils','BUILD_OUTPUT_DIR','项目构建完成','yarn','正在切换到目标分支:\x20','):\x20'];a7_0x1776=function(){return _0x4979d4;};return a7_0x1776();}module[a7_0x522780(0x15c)]=async arguments=>{const _0x47c4e0=a7_0x522780;let _0x1c480e=null;const _0x26d234=path[_0x47c4e0(0x194)](__dirname,_0x47c4e0(0x19a));!fileExists(_0x26d234)&&(logError('未检测到认证信息,请先执行登录操作'),process[_0x47c4e0(0x1a1)](0x1));let _0x286801,_0x441a2e;try{logInfo('正在加载认证信息...');const _0x52ece0=loadAuth(_0x26d234);_0x286801=_0x52ece0[_0x47c4e0(0x1d9)],_0x441a2e=_0x52ece0[_0x47c4e0(0x177)],logSuccess('认证信息加载成功');}catch(_0xeaa7ca){logError(_0x47c4e0(0x1b1)+_0xeaa7ca[_0x47c4e0(0x186)]),process[_0x47c4e0(0x1a1)](0x1);}const _0x1184b8=arguments[0x1]?arguments[0x1][_0x47c4e0(0x15e)]('-'):[],_0x2d9012=path['resolve']('./'),_0x3f26f9=path[_0x47c4e0(0x194)](_0x2d9012,_0x47c4e0(0x198)),_0x21772c=path[_0x47c4e0(0x194)](_0x2d9012,CONSTANTS['CONFIG_FILE_NAME']),_0x421a2b=path[_0x47c4e0(0x194)](_0x2d9012,CONSTANTS[_0x47c4e0(0x1d1)]),_0x3fcdf9=os[_0x47c4e0(0x18b)](),_0x2de06a=fileExists(path[_0x47c4e0(0x194)](_0x2d9012,_0x47c4e0(0x1a5)))?_0x47c4e0(0x1d3):_0x47c4e0(0x1b2),_0x58ff7b=_0x2de06a===_0x47c4e0(0x1d3)?_0x47c4e0(0x1d3):_0x47c4e0(0x17e),_0x3c7ae8=_0xb3d4e6=>_0x2de06a===_0x47c4e0(0x1d3)?'yarn\x20run\x20'+_0xb3d4e6:_0x47c4e0(0x1b6)+_0xb3d4e6;logInfo(_0x47c4e0(0x1b8));!fileExists(_0x3f26f9)&&(logError(_0x47c4e0(0x1ad)),process[_0x47c4e0(0x1a1)](0x1));let _0x413e50;try{_0x413e50=JSON[_0x47c4e0(0x1ce)](fs[_0x47c4e0(0x1bf)](_0x3f26f9,'utf8')),logSuccess(_0x47c4e0(0x18a));}catch(_0x93f36a){logError(_0x47c4e0(0x1cf)+_0x93f36a[_0x47c4e0(0x186)]),process[_0x47c4e0(0x1a1)](0x1);}const _0xf57365=_0x413e50[_0x47c4e0(0x167)]||{},_0x575c18=['build'],_0x203053=Object[_0x47c4e0(0x17d)](_0xf57365)[_0x47c4e0(0x1a0)](_0x30e52c=>{const _0x2e3868=_0x47c4e0;return _0x575c18[_0x2e3868(0x1c6)](_0x227149=>_0x30e52c['toLowerCase']()[_0x2e3868(0x16d)](_0x227149));});_0x203053[_0x47c4e0(0x19e)]===0x0&&(logError(_0x47c4e0(0x1bb)),process[_0x47c4e0(0x1a1)](0x1));const {selectedScript:_0x528fdd}=await inquirer[_0x47c4e0(0x16e)]([{'type':_0x47c4e0(0x1ab),'name':_0x47c4e0(0x173),'message':_0x47c4e0(0x15d),'choices':_0x203053[_0x47c4e0(0x1a3)](_0x2f7b16=>({'name':_0x2f7b16+'\x20('+_0xf57365[_0x2f7b16]+')','value':_0x2f7b16}))}]);logInfo(_0x47c4e0(0x192)+_0x528fdd),logInfo(_0x47c4e0(0x1b8));!fileExists(_0x21772c)&&(logError('未找到\x20jjb.config.json\x20文件'),process[_0x47c4e0(0x1a1)](0x1));let _0x24bee9;try{_0x24bee9=require(_0x21772c),_0x24bee9=_0x24bee9['__esModule']?_0x24bee9['default']:_0x24bee9,logSuccess(_0x47c4e0(0x17f));}catch(_0xdb7ec5){logError(_0x47c4e0(0x1ba)+_0xdb7ec5[_0x47c4e0(0x186)]),process[_0x47c4e0(0x1a1)](0x1);}const _0x180eed=[_0x47c4e0(0x18f),_0x47c4e0(0x195),_0x47c4e0(0x1da)],_0x5168a8=validateConfig(_0x24bee9,_0x180eed);!_0x5168a8[_0x47c4e0(0x178)]&&(logError(_0x47c4e0(0x19b)+_0x5168a8[_0x47c4e0(0x187)]['join'](',\x20')),process['exit'](0x1));let _0x33e671=null;if(_0x24bee9[_0x47c4e0(0x18c)]&&typeof _0x24bee9[_0x47c4e0(0x18c)]===_0x47c4e0(0x1a4)){const _0x1ea4ef=Object[_0x47c4e0(0x17d)](_0x24bee9[_0x47c4e0(0x18c)]);if(_0x1ea4ef[_0x47c4e0(0x19e)]>0x0){const {envType:_0x5af6e8}=await inquirer[_0x47c4e0(0x16e)]([{'type':_0x47c4e0(0x1ab),'name':_0x47c4e0(0x1b3),'message':_0x47c4e0(0x170),'choices':_0x1ea4ef['map'](_0x5a1f28=>({'name':_0x5a1f28,'value':_0x5a1f28}))}]);_0x33e671=_0x5af6e8,logInfo(_0x47c4e0(0x1c7)+_0x33e671);}else logWarning('environment\x20配置为空,将使用默认分支');}else logWarning(_0x47c4e0(0x168));logInfo(_0x47c4e0(0x16a)),axios[_0x47c4e0(0x1c9)](getApiHost()+_0x47c4e0(0x179),{'username':_0x286801,'password':_0x441a2e})[_0x47c4e0(0x190)](async _0x11a2e1=>{const _0x52dda5=_0x47c4e0;if(_0x11a2e1[_0x52dda5(0x1d7)][_0x52dda5(0x16b)]){logSuccess('服务器授权成功');const _0x5c5cb0=GIT_TEMP_JAVA+'-'+Date[_0x52dda5(0x1ca)]()+'-'+Math['random']()[_0x52dda5(0x1b7)](0x24)['substr'](0x2,0x9);_0x1c480e=_0x5c5cb0;const _0x1968e0=path[_0x52dda5(0x194)](_0x3fcdf9,_0x5c5cb0);logInfo(_0x52dda5(0x176));fileExists(_0x1968e0)&&deleteFolderRecursive(_0x1968e0);createDir(_0x1968e0),logSuccess('临时工作目录已创建');const _0x1ca735=path['join'](_0x1968e0,_0x24bee9[_0x52dda5(0x195)]);logInfo(_0x52dda5(0x185)),fileExists(_0x1ca735)?_0x1184b8[_0x52dda5(0x16d)](_0x52dda5(0x18e))?(logInfo(_0x52dda5(0x1aa)),DeleteDirAllFile(_0x1ca735,()=>{const _0x14760f=_0x52dda5;executeCommand(_0x14760f(0x1ac)+_0x24bee9[_0x14760f(0x18f)],_0x1968e0),logSuccess('Git\x20仓库克隆完成');})):(executeCommand(_0x52dda5(0x1ac)+_0x24bee9[_0x52dda5(0x18f)],_0x1968e0),logSuccess(_0x52dda5(0x1cc))):(executeCommand(_0x52dda5(0x1ac)+_0x24bee9[_0x52dda5(0x18f)],_0x1968e0),logSuccess(_0x52dda5(0x1cc))),_0x181d73(_0x1968e0,_0x24bee9,_0x5c5cb0,_0x528fdd,_0x33e671);}else logError('授权失败:\x20'+(_0x11a2e1[_0x52dda5(0x1d7)]['message']||_0x52dda5(0x165))),process[_0x52dda5(0x1a1)](0x1);})[_0x47c4e0(0x1c3)](_0x128467=>{const _0x4336c8=_0x47c4e0;if(_0x128467&&_0x128467['response']){const _0x279621=_0x128467[_0x4336c8(0x1de)][_0x4336c8(0x16b)];_0x279621===0x191||_0x279621===0x193?logError(_0x4336c8(0x17c)+_0x279621+'):\x20认证信息无效或无权限'):logError(_0x4336c8(0x1c0)+_0x279621+_0x4336c8(0x1d5)+(_0x128467['response'][_0x4336c8(0x1d7)]?.[_0x4336c8(0x186)]||_0x128467[_0x4336c8(0x186)]));}else _0x128467&&_0x128467[_0x4336c8(0x197)]?logError('网络连接失败:\x20无法连接到服务器'):logError(_0x4336c8(0x1b0)+(_0x128467[_0x4336c8(0x186)]||_0x4336c8(0x165)));process['exit'](0x1);}),process['on']('exit',()=>{const _0x523070=_0x47c4e0;if(_0x1c480e){const _0x113bb8=path[_0x523070(0x194)](os['tmpdir'](),_0x1c480e);if(fileExists(_0x113bb8))try{deleteFolderRecursive(_0x113bb8);}catch(_0x449d19){}}}),process['on'](_0x47c4e0(0x162),_0x430b17=>{const _0x1f21b5=_0x47c4e0;if(_0x1c480e){const _0x22dc2c=path[_0x1f21b5(0x194)](os[_0x1f21b5(0x18b)](),_0x1c480e);if(fileExists(_0x22dc2c))try{deleteFolderRecursive(_0x22dc2c);}catch(_0x16e4a3){}}throw _0x430b17;});function _0x181d73(_0x844f72,_0x28cd98,_0x474dfd,_0x4dd761,_0x4f01c1){const _0x14e9e1=_0x47c4e0,_0x4cb580=path[_0x14e9e1(0x194)](_0x844f72,_0x28cd98['javaGitName']);logInfo(_0x14e9e1(0x1b4)),executeCommand(_0x14e9e1(0x183),_0x4cb580),logSuccess(_0x14e9e1(0x163));!fileExists(path['join'](_0x2d9012,_0x14e9e1(0x191)))?(logWarning(_0x14e9e1(0x1b5)),logInfo(_0x14e9e1(0x1cd)+_0x2de06a+_0x14e9e1(0x1b9)),executeCommand(_0x58ff7b,_0x2d9012),logSuccess(_0x14e9e1(0x1c2))):logInfo('项目依赖检查通过');try{logInfo('正在执行构建命令:\x20'+_0x3c7ae8(_0x4dd761)),executeCommand(_0x3c7ae8(_0x4dd761),_0x2d9012,{'maxBuffer':CONSTANTS[_0x14e9e1(0x1dc)]}),logSuccess(_0x14e9e1(0x1d2));}catch(_0x823862){logError(_0x14e9e1(0x17b)+_0x823862['message']);const _0x17123e=path[_0x14e9e1(0x194)](os[_0x14e9e1(0x18b)](),_0x474dfd);if(fileExists(_0x17123e))try{deleteFolderRecursive(_0x17123e),logInfo(_0x14e9e1(0x1d8)+_0x474dfd);}catch(_0x3c5c80){logWarning(_0x14e9e1(0x174)+_0x3c5c80[_0x14e9e1(0x186)]);}process[_0x14e9e1(0x1a1)](0x1);}if(fileExists(_0x421a2b)){logInfo('正在处理构建产物...');const _0x25dd0c=_0x28cd98[_0x14e9e1(0x1da)],_0x2e75dc=readFile(path[_0x14e9e1(0x194)](_0x421a2b,_0x14e9e1(0x196)));_0x1184b8[_0x14e9e1(0x16d)](_0x14e9e1(0x175))?(writeFile(path[_0x14e9e1(0x194)](_0x421a2b,_0x14e9e1(0x196)),_0x2e75dc),logInfo(_0x14e9e1(0x15b))):(writeFile(path['join'](_0x421a2b,_0x25dd0c+_0x14e9e1(0x1a8)),_0x2e75dc),logInfo(_0x14e9e1(0x160)+_0x25dd0c+'.html\x20文件'));const _0x37c5cd=path[_0x14e9e1(0x194)](_0x4cb580,CONSTANTS[_0x14e9e1(0x1be)]);logInfo(_0x14e9e1(0x166)),createDir(_0x37c5cd);const _0x1a244a=_0x4f01c1&&_0x28cd98[_0x14e9e1(0x18c)]&&_0x28cd98[_0x14e9e1(0x18c)][_0x4f01c1]&&_0x28cd98[_0x14e9e1(0x18c)][_0x4f01c1][_0x14e9e1(0x1bd)]?_0x28cd98[_0x14e9e1(0x18c)][_0x4f01c1][_0x14e9e1(0x1bd)]:CONSTANTS[_0x14e9e1(0x19f)];logInfo(_0x14e9e1(0x1d4)+_0x1a244a),executeCommand(_0x14e9e1(0x1a7)+_0x1a244a,_0x4cb580),logSuccess(_0x14e9e1(0x1c5));const _0x27c4a5=path[_0x14e9e1(0x194)](_0x37c5cd,_0x28cd98[_0x14e9e1(0x1da)]);logInfo(_0x14e9e1(0x193)),DeleteDirAllFile(_0x27c4a5,()=>{const _0x1dee76=_0x14e9e1;createDir(_0x27c4a5),logInfo(_0x1dee76(0x181)),writeFile(path['join'](_0x37c5cd,_0x25dd0c+_0x1dee76(0x1a8)),_0x2e75dc),CopyFolder(path[_0x1dee76(0x194)](_0x421a2b,_0x28cd98['appIdentifier']),_0x27c4a5,async()=>{logSuccess('构建产物复制完成'),setTimeout(async()=>{const _0x17bbac=a7_0x321c;logInfo(_0x17bbac(0x1bc)),executeCommand(_0x17bbac(0x183),_0x4cb580),logInfo(_0x17bbac(0x1a6)),executeCommand(_0x17bbac(0x172),_0x4cb580);const {commitMessage:_0x5ece9d}=await inquirer[_0x17bbac(0x16e)]([{'type':_0x17bbac(0x1c8),'name':'commitMessage','message':_0x17bbac(0x199),'default':_0x17bbac(0x19d)}]),_0x5cc93d=_0x5ece9d[_0x17bbac(0x1ae)]()||_0x17bbac(0x19d);try{logInfo(_0x17bbac(0x171)),executeCommand(_0x17bbac(0x18d)+_0x5cc93d+'\x22\x20--no-verify',_0x4cb580),logSuccess(_0x17bbac(0x169));}catch(_0x5f15ba){logWarning(_0x17bbac(0x15f));}logInfo(_0x17bbac(0x1a2)),executeCommand(_0x17bbac(0x188),_0x4cb580),logSuccess(_0x17bbac(0x184)),setTimeout(()=>{const _0x2c9cb2=_0x17bbac;logInfo(_0x2c9cb2(0x16f));const _0x4d2a47=path[_0x2c9cb2(0x194)](os['tmpdir'](),_0x474dfd);if(fileExists(_0x4d2a47))try{deleteFolderRecursive(_0x4d2a47),logSuccess(_0x2c9cb2(0x1d8)+_0x474dfd);}catch(_0x925b88){logWarning(_0x2c9cb2(0x174)+_0x925b88[_0x2c9cb2(0x186)]);}},CONSTANTS[_0x17bbac(0x161)]*0x2);},CONSTANTS['SYNC_DELAY']);});});}else{logError(_0x14e9e1(0x17a));const _0x595c60=path[_0x14e9e1(0x194)](os['tmpdir'](),_0x474dfd);if(fileExists(_0x595c60))try{deleteFolderRecursive(_0x595c60),logInfo(_0x14e9e1(0x1d8)+_0x474dfd);}catch(_0x21c601){logWarning(_0x14e9e1(0x174)+_0x21c601[_0x14e9e1(0x186)]);}process['exit'](0x1);}}};
1
+ const a7_0x10b04b=a7_0x3525;(function(_0x3369e8,_0x233974){const _0x34bb2f=a7_0x3525,_0x4e3d29=_0x3369e8();while(!![]){try{const _0x44b420=-parseInt(_0x34bb2f(0x157))/0x1+parseInt(_0x34bb2f(0x120))/0x2*(parseInt(_0x34bb2f(0x140))/0x3)+-parseInt(_0x34bb2f(0x12e))/0x4*(parseInt(_0x34bb2f(0xf5))/0x5)+parseInt(_0x34bb2f(0x113))/0x6*(parseInt(_0x34bb2f(0x148))/0x7)+-parseInt(_0x34bb2f(0x11e))/0x8+parseInt(_0x34bb2f(0x159))/0x9*(-parseInt(_0x34bb2f(0xed))/0xa)+parseInt(_0x34bb2f(0x152))/0xb;if(_0x44b420===_0x233974)break;else _0x4e3d29['push'](_0x4e3d29['shift']());}catch(_0x52f298){_0x4e3d29['push'](_0x4e3d29['shift']());}}}(a7_0x4d38,0x7cf8a));function a7_0x4d38(){const _0x1af951=['4hbGHzI','response','请求失败\x20(','代码提交成功','username','未找到\x20jjb.config.json\x20文件','map','配置文件中缺少必要字段:\x20','BUILD_OUTPUT_DIR','正在克隆\x20Git\x20仓库...','Git\x20仓库克隆完成','scripts','代码提交跳过:\x20没有需要提交的变更','yarn','404gAeyeT','javaGit','已选择环境:\x20','已生成\x20index.html\x20文件','.html\x20文件','node_modules','trim','正在复制构建产物到目标目录...','正在处理构建产物...','已选择打包命令:\x20','正在提交代码变更...','some','正在同步远程仓库...','解析\x20jjb.config.json\x20失败:\x20','javaGitName','git\x20add\x20.','正在推送代码到远程仓库...','index.html','1091319nWeVKc','appIdentifier','临时工作目录已清理:\x20','git\x20commit\x20-m\x20\x22','./utils','已生成\x20','prompt','uncaughtException','212485ccBkaW','package.json\x20读取成功','keys','list','分支切换完成','git\x20pull','未找到\x20environment\x20配置,将使用默认分支','git\x20checkout\x20','项目构建失败:\x20','正在添加文件变更...','18034027PGxfiz','操作失败:\x20','正在执行构建命令:\x20','读取认证信息失败:\x20','then','336828tSkAsP','index','811494LrDSWI','jjb.config.json\x20读取成功','length','axios','now','认证信息加载成功','toString','npm\x20run\x20','检测到未安装项目依赖','environment\x20配置为空,将使用默认分支','构建产物复制完成','TEMPLATES_PATH','utf8','未知错误','tmpdir','object','yarn\x20run\x20','未检测到认证信息,请先执行登录操作','110bnHjGx','git\x20push','readFileSync','force','path','npm','未找到\x20package.json\x20文件','请选择要执行的打包命令:','20185zDNgJn','yarn.lock','临时工作目录已创建','正在加载认证信息...','npm\x20install','授权失败\x20(','git\x20clone\x20','正在清理临时工作目录...','授权失败:\x20','default','项目依赖检查通过','正在准备临时工作目录...','正在请求服务器授权...','__esModule','exit','./crypto-utils','CONFIG_FILE_NAME','SYNC_DELAY','未找到打包相关的命令,请检查\x20package.json\x20中的\x20scripts\x20配置','input','inquirer','项目构建完成','正在创建模板目录...','项目依赖安装完成','):\x20','environment','password','join','正在切换到目标分支:\x20','commitMessage','150koLzxw','package.json','includes','request','message','构建产物目录不存在,请检查构建输出配置','./config','javaGitBranch','exports','status','清理临时目录失败:\x20','7020840NycAWA','正在安装项目依赖\x20('];a7_0x4d38=function(){return _0x1af951;};return a7_0x4d38();}const os=require('os'),path=require(a7_0x10b04b(0xf1)),fs=require('fs'),inquirer=require(a7_0x10b04b(0x109)),{CopyFolder,DeleteDirAllFile}=require(a7_0x10b04b(0x144)),{GIT_TEMP_JAVA,getApiHost}=require(a7_0x10b04b(0x119)),axios=require(a7_0x10b04b(0x15c)),{CONSTANTS,logInfo,logSuccess,logWarning,logError,executeCommand,deleteFolderRecursive,fileExists,readFile,writeFile,createDir,isViteProject,validateConfig}=require(a7_0x10b04b(0x144)),{loadAuth}=require(a7_0x10b04b(0x104));function a7_0x3525(_0x3dcc4f,_0x4f78c7){_0x3dcc4f=_0x3dcc4f-0xe3;const _0x4d3816=a7_0x4d38();let _0x3525dc=_0x4d3816[_0x3dcc4f];return _0x3525dc;}module[a7_0x10b04b(0x11b)]=async arguments=>{const _0x277fdc=a7_0x10b04b;let _0x53173e=null;const _0x2972d7=path[_0x277fdc(0x110)](__dirname,'../.auth');!fileExists(_0x2972d7)&&(logError(_0x277fdc(0xec)),process[_0x277fdc(0x103)](0x1));let _0x249d64,_0xe6c596;try{logInfo(_0x277fdc(0xf8));const _0x2d71a4=loadAuth(_0x2972d7);_0x249d64=_0x2d71a4[_0x277fdc(0x124)],_0xe6c596=_0x2d71a4[_0x277fdc(0x10f)],logSuccess(_0x277fdc(0x15e));}catch(_0x30d6a3){logError(_0x277fdc(0x155)+_0x30d6a3[_0x277fdc(0x117)]),process[_0x277fdc(0x103)](0x1);}const _0x2fd323=arguments[0x1]?arguments[0x1]['split']('-'):[],_0x4a938a=path['resolve']('./'),_0x2d672a=path[_0x277fdc(0x110)](_0x4a938a,_0x277fdc(0x114)),_0x460dc1=path[_0x277fdc(0x110)](_0x4a938a,CONSTANTS[_0x277fdc(0x105)]),_0x55f19c=path['join'](_0x4a938a,CONSTANTS[_0x277fdc(0x128)]),_0x4d1c12=os['tmpdir'](),_0x59c33d=fileExists(path['join'](_0x4a938a,_0x277fdc(0xf6)))?_0x277fdc(0x12d):_0x277fdc(0xf2),_0x13ffa4=_0x59c33d==='yarn'?_0x277fdc(0x12d):_0x277fdc(0xf9),_0x4f7efa=_0x711e42=>_0x59c33d==='yarn'?_0x277fdc(0xeb)+_0x711e42:_0x277fdc(0x160)+_0x711e42;logInfo('正在检查项目配置文件...');!fileExists(_0x2d672a)&&(logError(_0x277fdc(0xf3)),process['exit'](0x1));let _0x5390d4;try{_0x5390d4=JSON['parse'](fs[_0x277fdc(0xef)](_0x2d672a,_0x277fdc(0xe7))),logSuccess(_0x277fdc(0x149));}catch(_0x1b30c9){logError('解析\x20package.json\x20失败:\x20'+_0x1b30c9[_0x277fdc(0x117)]),process[_0x277fdc(0x103)](0x1);}const _0x343c4e=_0x5390d4[_0x277fdc(0x12b)]||{},_0x4df598=['build'],_0x33d0f9=Object[_0x277fdc(0x14a)](_0x343c4e)['filter'](_0x1070ef=>{const _0x3e9eb5=_0x277fdc;return _0x4df598[_0x3e9eb5(0x139)](_0x201596=>_0x1070ef['toLowerCase']()['includes'](_0x201596));});_0x33d0f9[_0x277fdc(0x15b)]===0x0&&(logError(_0x277fdc(0x107)),process[_0x277fdc(0x103)](0x1));const {selectedScript:_0x23fc1f}=await inquirer[_0x277fdc(0x146)]([{'type':'list','name':'selectedScript','message':_0x277fdc(0xf4),'choices':_0x33d0f9[_0x277fdc(0x126)](_0x34cc7e=>({'name':_0x34cc7e+'\x20('+_0x343c4e[_0x34cc7e]+')','value':_0x34cc7e}))}]);logInfo(_0x277fdc(0x137)+_0x23fc1f),logInfo('正在检查项目配置文件...');!fileExists(_0x460dc1)&&(logError(_0x277fdc(0x125)),process[_0x277fdc(0x103)](0x1));let _0x582cf4;try{_0x582cf4=require(_0x460dc1),_0x582cf4=_0x582cf4[_0x277fdc(0x102)]?_0x582cf4[_0x277fdc(0xfe)]:_0x582cf4,logSuccess(_0x277fdc(0x15a));}catch(_0x253e29){logError(_0x277fdc(0x13b)+_0x253e29[_0x277fdc(0x117)]),process[_0x277fdc(0x103)](0x1);}const _0x87d45d=[_0x277fdc(0x12f),_0x277fdc(0x13c),_0x277fdc(0x141)],_0x1c5484=validateConfig(_0x582cf4,_0x87d45d);!_0x1c5484['isValid']&&(logError(_0x277fdc(0x127)+_0x1c5484['missingFields'][_0x277fdc(0x110)](',\x20')),process[_0x277fdc(0x103)](0x1));let _0x342687=null;if(_0x582cf4[_0x277fdc(0x10e)]&&typeof _0x582cf4[_0x277fdc(0x10e)]===_0x277fdc(0xea)){const _0x3e9b49=Object[_0x277fdc(0x14a)](_0x582cf4[_0x277fdc(0x10e)]);if(_0x3e9b49[_0x277fdc(0x15b)]>0x0){const {envType:_0x36d54b}=await inquirer['prompt']([{'type':_0x277fdc(0x14b),'name':'envType','message':'请选择环境:','choices':_0x3e9b49[_0x277fdc(0x126)](_0x237426=>({'name':_0x237426,'value':_0x237426}))}]);_0x342687=_0x36d54b,logInfo(_0x277fdc(0x130)+_0x342687);}else logWarning(_0x277fdc(0xe4));}else logWarning(_0x277fdc(0x14e));logInfo(_0x277fdc(0x101)),axios['post'](getApiHost()+'/api/auth',{'username':_0x249d64,'password':_0xe6c596})[_0x277fdc(0x156)](async _0x5383e3=>{const _0x29549d=_0x277fdc;if(_0x5383e3['data']['status']){logSuccess('服务器授权成功');const _0x381efc=GIT_TEMP_JAVA+'-'+Date[_0x29549d(0x15d)]()+'-'+Math['random']()[_0x29549d(0x15f)](0x24)['substr'](0x2,0x9);_0x53173e=_0x381efc;const _0x3578d3=path[_0x29549d(0x110)](_0x4d1c12,_0x381efc);logInfo(_0x29549d(0x100));fileExists(_0x3578d3)&&deleteFolderRecursive(_0x3578d3);createDir(_0x3578d3),logSuccess(_0x29549d(0xf7));const _0x35f882=path[_0x29549d(0x110)](_0x3578d3,_0x582cf4['javaGitName']);logInfo(_0x29549d(0x129)),fileExists(_0x35f882)?_0x2fd323[_0x29549d(0x115)](_0x29549d(0xf0))?(logInfo('检测到已存在的仓库,正在强制清理...'),DeleteDirAllFile(_0x35f882,()=>{const _0x316260=_0x29549d;executeCommand(_0x316260(0xfb)+_0x582cf4[_0x316260(0x12f)],_0x3578d3),logSuccess(_0x316260(0x12a));})):(executeCommand('git\x20clone\x20'+_0x582cf4[_0x29549d(0x12f)],_0x3578d3),logSuccess(_0x29549d(0x12a))):(executeCommand(_0x29549d(0xfb)+_0x582cf4['javaGit'],_0x3578d3),logSuccess(_0x29549d(0x12a))),_0x59c3ee(_0x3578d3,_0x582cf4,_0x381efc,_0x23fc1f,_0x342687);}else logError(_0x29549d(0xfd)+(_0x5383e3['data']['message']||_0x29549d(0xe8))),process['exit'](0x1);})['catch'](_0x4a0369=>{const _0x591b39=_0x277fdc;if(_0x4a0369&&_0x4a0369[_0x591b39(0x121)]){const _0x19400f=_0x4a0369[_0x591b39(0x121)][_0x591b39(0x11c)];_0x19400f===0x191||_0x19400f===0x193?logError(_0x591b39(0xfa)+_0x19400f+'):\x20认证信息无效或无权限'):logError(_0x591b39(0x122)+_0x19400f+_0x591b39(0x10d)+(_0x4a0369[_0x591b39(0x121)]['data']?.[_0x591b39(0x117)]||_0x4a0369[_0x591b39(0x117)]));}else _0x4a0369&&_0x4a0369[_0x591b39(0x116)]?logError('网络连接失败:\x20无法连接到服务器'):logError(_0x591b39(0x153)+(_0x4a0369[_0x591b39(0x117)]||_0x591b39(0xe8)));process[_0x591b39(0x103)](0x1);}),process['on'](_0x277fdc(0x103),()=>{const _0x365ccc=_0x277fdc;if(_0x53173e){const _0x37b180=path[_0x365ccc(0x110)](os[_0x365ccc(0xe9)](),_0x53173e);if(fileExists(_0x37b180))try{deleteFolderRecursive(_0x37b180);}catch(_0x5975c0){}}}),process['on'](_0x277fdc(0x147),_0x9300ae=>{const _0xa0265d=_0x277fdc;if(_0x53173e){const _0x22bd54=path['join'](os[_0xa0265d(0xe9)](),_0x53173e);if(fileExists(_0x22bd54))try{deleteFolderRecursive(_0x22bd54);}catch(_0x1fc74b){}}throw _0x9300ae;});function _0x59c3ee(_0x5ef4bf,_0xec6722,_0xe0e5d6,_0x12d018,_0xc5235d){const _0x35e15f=_0x277fdc,_0x580776=path[_0x35e15f(0x110)](_0x5ef4bf,_0xec6722['javaGitName']);logInfo('正在同步\x20Git\x20仓库最新代码...'),executeCommand(_0x35e15f(0x14d),_0x580776),logSuccess('代码同步完成');!fileExists(path[_0x35e15f(0x110)](_0x4a938a,_0x35e15f(0x133)))?(logWarning(_0x35e15f(0xe3)),logInfo(_0x35e15f(0x11f)+_0x59c33d+'),请稍候...'),executeCommand(_0x13ffa4,_0x4a938a),logSuccess(_0x35e15f(0x10c))):logInfo(_0x35e15f(0xff));try{logInfo(_0x35e15f(0x154)+_0x4f7efa(_0x12d018)),executeCommand(_0x4f7efa(_0x12d018),_0x4a938a,{'maxBuffer':CONSTANTS['MAX_BUFFER_SIZE']}),logSuccess(_0x35e15f(0x10a));}catch(_0x43e7bc){logError(_0x35e15f(0x150)+_0x43e7bc[_0x35e15f(0x117)]);const _0x2b31a3=path[_0x35e15f(0x110)](os[_0x35e15f(0xe9)](),_0xe0e5d6);if(fileExists(_0x2b31a3))try{deleteFolderRecursive(_0x2b31a3),logInfo(_0x35e15f(0x142)+_0xe0e5d6);}catch(_0x4c9980){logWarning(_0x35e15f(0x11d)+_0x4c9980['message']);}process[_0x35e15f(0x103)](0x1);}if(fileExists(_0x55f19c)){logInfo(_0x35e15f(0x136));const _0x133a0a=_0xec6722[_0x35e15f(0x141)],_0x1695cd=readFile(path[_0x35e15f(0x110)](_0x55f19c,_0x35e15f(0x13f)));_0x2fd323['includes'](_0x35e15f(0x158))?(writeFile(path['join'](_0x55f19c,_0x35e15f(0x13f)),_0x1695cd),logInfo(_0x35e15f(0x131))):(writeFile(path[_0x35e15f(0x110)](_0x55f19c,_0x133a0a+'.html'),_0x1695cd),logInfo(_0x35e15f(0x145)+_0x133a0a+_0x35e15f(0x132)));const _0x31fd30=path[_0x35e15f(0x110)](_0x580776,CONSTANTS[_0x35e15f(0xe6)]);logInfo(_0x35e15f(0x10b)),createDir(_0x31fd30);const _0xb0ca0a=_0xc5235d&&_0xec6722['environment']&&_0xec6722['environment'][_0xc5235d]&&_0xec6722[_0x35e15f(0x10e)][_0xc5235d][_0x35e15f(0x11a)]?_0xec6722['environment'][_0xc5235d][_0x35e15f(0x11a)]:CONSTANTS['DEFAULT_BRANCH'];logInfo(_0x35e15f(0x111)+_0xb0ca0a),executeCommand(_0x35e15f(0x14f)+_0xb0ca0a,_0x580776),logSuccess(_0x35e15f(0x14c));const _0x2768e6=path['join'](_0x31fd30,_0xec6722[_0x35e15f(0x141)]);logInfo('正在清理目标目录...'),DeleteDirAllFile(_0x2768e6,()=>{const _0x284d2c=_0x35e15f;createDir(_0x2768e6),logInfo(_0x284d2c(0x135)),writeFile(path[_0x284d2c(0x110)](_0x31fd30,_0x133a0a+'.html'),_0x1695cd),CopyFolder(path[_0x284d2c(0x110)](_0x55f19c,_0xec6722['appIdentifier']),_0x2768e6,async()=>{const _0x2a6185=_0x284d2c;logSuccess(_0x2a6185(0xe5)),setTimeout(async()=>{const _0x235e4d=_0x2a6185;logInfo(_0x235e4d(0x13a)),executeCommand(_0x235e4d(0x14d),_0x580776),logInfo(_0x235e4d(0x151)),executeCommand(_0x235e4d(0x13d),_0x580776);const {commitMessage:_0x2e2988}=await inquirer['prompt']([{'type':_0x235e4d(0x108),'name':_0x235e4d(0x112),'message':'请输入提交信息:','default':'no\x20message'}]),_0x34a36d=_0x2e2988[_0x235e4d(0x134)]()||'no\x20message';try{logInfo(_0x235e4d(0x138)),executeCommand(_0x235e4d(0x143)+_0x34a36d+'\x22\x20--no-verify',_0x580776),logSuccess(_0x235e4d(0x123));}catch(_0xea4fb5){logWarning(_0x235e4d(0x12c));}logInfo(_0x235e4d(0x13e)),executeCommand(_0x235e4d(0xee),_0x580776),logSuccess('代码推送完成'),setTimeout(()=>{const _0x1d9b94=_0x235e4d;logInfo(_0x1d9b94(0xfc));const _0x4865d6=path[_0x1d9b94(0x110)](os[_0x1d9b94(0xe9)](),_0xe0e5d6);if(fileExists(_0x4865d6))try{deleteFolderRecursive(_0x4865d6),logSuccess(_0x1d9b94(0x142)+_0xe0e5d6);}catch(_0x60feb){logWarning('清理临时目录失败:\x20'+_0x60feb[_0x1d9b94(0x117)]);}},CONSTANTS['SYNC_DELAY']*0x2);},CONSTANTS[_0x2a6185(0x106)]);});});}else{logError(_0x35e15f(0x118));const _0x3f984e=path[_0x35e15f(0x110)](os[_0x35e15f(0xe9)](),_0xe0e5d6);if(fileExists(_0x3f984e))try{deleteFolderRecursive(_0x3f984e),logInfo(_0x35e15f(0x142)+_0xe0e5d6);}catch(_0x48346a){logWarning(_0x35e15f(0x11d)+_0x48346a[_0x35e15f(0x117)]);}process[_0x35e15f(0x103)](0x1);}}};
package/src/rm-rf.js CHANGED
@@ -1 +1 @@
1
- const a8_0xc34111=a8_0x4366;(function(_0x163153,_0x7936f7){const _0x443b6f=a8_0x4366,_0x2c130e=_0x163153();while(!![]){try{const _0x4b71d0=parseInt(_0x443b6f(0x1d3))/0x1*(parseInt(_0x443b6f(0x1cb))/0x2)+parseInt(_0x443b6f(0x1de))/0x3+parseInt(_0x443b6f(0x1dc))/0x4*(-parseInt(_0x443b6f(0x1da))/0x5)+-parseInt(_0x443b6f(0x1d0))/0x6+-parseInt(_0x443b6f(0x1db))/0x7*(parseInt(_0x443b6f(0x1cf))/0x8)+parseInt(_0x443b6f(0x1dd))/0x9+-parseInt(_0x443b6f(0x1cd))/0xa*(-parseInt(_0x443b6f(0x1d5))/0xb);if(_0x4b71d0===_0x7936f7)break;else _0x2c130e['push'](_0x2c130e['shift']());}catch(_0x3f2565){_0x2c130e['push'](_0x2c130e['shift']());}}}(a8_0x3a66,0x3e2cc));const path=require('path'),inquirer=require(a8_0xc34111(0x1d2)),{logInfo,logSuccess,logError,logWarning,deleteFolderRecursive}=require('./utils');module['exports']=async function(){const _0xb9e6=a8_0xc34111,_0x42c1bf=path[_0xb9e6(0x1d1)]('./');logWarning(_0xb9e6(0x1cc)),logWarning(_0xb9e6(0x1d6));const {confirm:_0x419370}=await inquirer['prompt']([{'type':_0xb9e6(0x1d4),'name':_0xb9e6(0x1d4),'message':_0xb9e6(0x1ca),'default':![]}]);_0x419370?(logInfo('正在扫描目录结构...'),setTimeout(()=>{const _0x2dca32=_0xb9e6;try{logInfo('开始执行删除操作...'),deleteFolderRecursive(_0x42c1bf),logSuccess(_0x2dca32(0x1d8)),process[_0x2dca32(0x1d9)](0x0);}catch(_0x119994){logError(_0x2dca32(0x1ce)+_0x119994['message']),process[_0x2dca32(0x1d9)](0x1);}},0x3e8)):(logInfo(_0xb9e6(0x1d7)),process['exit'](0x0));};function a8_0x4366(_0x437271,_0x1c6079){_0x437271=_0x437271-0x1ca;const _0x3a660a=a8_0x3a66();let _0x4366fb=_0x3a660a[_0x437271];return _0x4366fb;}function a8_0x3a66(){const _0x1b73e6=['resolve','inquirer','18329qQVAkO','confirm','385lnKizK','删除后不可恢复,请谨慎操作','操作已取消','所有文件已成功删除','exit','921470QKKTcz','14NLFfJD','8RgxwER','4204782cYGlgL','836952lbtpXa','是否确认删除?删除后不可恢复!','10BsciVa','危险操作:此命令将删除当前目录下的所有文件和文件夹','5290hSFddF','删除操作失败:\x20','479344etuUPi','679500UDhmtk'];a8_0x3a66=function(){return _0x1b73e6;};return a8_0x3a66();}
1
+ function a8_0x1c56(_0x4f6147,_0x2a4c1c){_0x4f6147=_0x4f6147-0x68;const _0x319bac=a8_0x319b();let _0x1c56f1=_0x319bac[_0x4f6147];return _0x1c56f1;}function a8_0x319b(){const _0x1d7261=['146391hwugya','1673520eWCIHT','exit','exports','resolve','./utils','54gQUNEz','操作已取消','confirm','1076724SMeXCo','13238505yrQifn','删除操作失败:\x20','message','prompt','inquirer','开始执行删除操作...','32785znhDTB','是否确认删除?删除后不可恢复!','3598689YdNluj','2148662vllnLD','所有文件已成功删除','496xObJht'];a8_0x319b=function(){return _0x1d7261;};return a8_0x319b();}const a8_0x4a152f=a8_0x1c56;(function(_0x35ca3a,_0x14545f){const _0x6dd45b=a8_0x1c56,_0x2be6a0=_0x35ca3a();while(!![]){try{const _0xc9494f=-parseInt(_0x6dd45b(0x7b))/0x1+-parseInt(_0x6dd45b(0x77))/0x2+parseInt(_0x6dd45b(0x76))/0x3+-parseInt(_0x6dd45b(0x6d))/0x4+parseInt(_0x6dd45b(0x74))/0x5*(-parseInt(_0x6dd45b(0x6a))/0x6)+parseInt(_0x6dd45b(0x7a))/0x7*(parseInt(_0x6dd45b(0x79))/0x8)+parseInt(_0x6dd45b(0x6e))/0x9;if(_0xc9494f===_0x14545f)break;else _0x2be6a0['push'](_0x2be6a0['shift']());}catch(_0x5d9fa4){_0x2be6a0['push'](_0x2be6a0['shift']());}}}(a8_0x319b,0xd98bd));const path=require('path'),inquirer=require(a8_0x4a152f(0x72)),{logInfo,logSuccess,logError,logWarning,deleteFolderRecursive}=require(a8_0x4a152f(0x69));module[a8_0x4a152f(0x7d)]=async function(){const _0x3ddfde=a8_0x4a152f,_0x49e86d=path[_0x3ddfde(0x68)]('./');logWarning('危险操作:此命令将删除当前目录下的所有文件和文件夹'),logWarning('删除后不可恢复,请谨慎操作');const {confirm:_0x105a0b}=await inquirer[_0x3ddfde(0x71)]([{'type':_0x3ddfde(0x6c),'name':'confirm','message':_0x3ddfde(0x75),'default':![]}]);_0x105a0b?(logInfo('正在扫描目录结构...'),setTimeout(()=>{const _0x367037=_0x3ddfde;try{logInfo(_0x367037(0x73)),deleteFolderRecursive(_0x49e86d),logSuccess(_0x367037(0x78)),process[_0x367037(0x7c)](0x0);}catch(_0x8407b7){logError(_0x367037(0x6f)+_0x8407b7[_0x367037(0x70)]),process[_0x367037(0x7c)](0x1);}},0x3e8)):(logInfo(_0x3ddfde(0x6b)),process[_0x3ddfde(0x7c)](0x0));};
package/src/utils.js CHANGED
@@ -1 +1 @@
1
- const a9_0x12bb3a=a9_0x2c72;(function(_0xa20a9d,_0x1f6d52){const _0x5e63bf=a9_0x2c72,_0x571f50=_0xa20a9d();while(!![]){try{const _0x112d5d=-parseInt(_0x5e63bf(0xc8))/0x1*(parseInt(_0x5e63bf(0xc4))/0x2)+parseInt(_0x5e63bf(0xde))/0x3+-parseInt(_0x5e63bf(0xe2))/0x4+-parseInt(_0x5e63bf(0xda))/0x5+-parseInt(_0x5e63bf(0xbe))/0x6*(-parseInt(_0x5e63bf(0xd5))/0x7)+parseInt(_0x5e63bf(0xd7))/0x8+-parseInt(_0x5e63bf(0xb7))/0x9*(parseInt(_0x5e63bf(0xc1))/0xa);if(_0x112d5d===_0x1f6d52)break;else _0x571f50['push'](_0x571f50['shift']());}catch(_0x235922){_0x571f50['push'](_0x571f50['shift']());}}}(a9_0x4f55,0x5338c));const fs=require('fs'),path=require(a9_0x12bb3a(0xba)),child_process=require('child_process'),chalk=require(a9_0x12bb3a(0xc6)),CONSTANTS={'MAX_BUFFER_SIZE':0x3b9aca00,'SYNC_DELAY':0x3e8,'DEFAULT_BRANCH':'master','CONFIG_FILE_NAME':a9_0x12bb3a(0xcb),'BUILD_OUTPUT_DIR':a9_0x12bb3a(0xcd),'TEMPLATES_PATH':a9_0x12bb3a(0xc0)};function logInfo(_0x3bc67b,_0x469b17=''){const _0x290ed1=chalk['blue']('ℹ'),_0x1508fb=_0x469b17?_0x290ed1+'\x20'+_0x3bc67b+'\x20'+_0x469b17:_0x290ed1+'\x20'+_0x3bc67b;console['log'](_0x1508fb);}function logSuccess(_0x386246){const _0xe97995=a9_0x12bb3a;console[_0xe97995(0xbf)](chalk['green']('✓\x20'+_0x386246));}function a9_0x4f55(){const _0x1c3214=['createReadStream','statSync','unlinkSync','1022058bBIAqE','writeFileSync','message','join','1364112fWAwck','mkdir','[工作目录:\x20','1063323KfGiRV','red','exports','path','pipe','existsSync','isDirectory','414mpxZQs','log','start/src/main/resources/templates','30kWBGeV','utf8','vite.config.js','22916HcoZMc','environment','chalk','close','2BOGKgn','createWriteStream','dirname','jjb.config.js','forEach','dist','vite.config.mjs','lstatSync','stat','length','rmdirSync','readdirSync','文件复制失败:\x20','49357YkfOcK','mkdirSync','4295488FrLDJf','filter','yellow','1524400RXLmhf'];a9_0x4f55=function(){return _0x1c3214;};return a9_0x4f55();}function logWarning(_0xc843cb){const _0x1c803f=a9_0x12bb3a;console['log'](chalk[_0x1c803f(0xd9)]('⚠\x20'+_0xc843cb));}function logError(_0x14efee){const _0x52037f=a9_0x12bb3a;console[_0x52037f(0xbf)](chalk[_0x52037f(0xb8)]('✗\x20'+_0x14efee));}function executeCommand(_0x4f889d,_0x3a7145,_0x4a0ea1={}){const _0x465498=a9_0x12bb3a;return logInfo('执行命令:\x20'+_0x4f889d,_0x3a7145?_0x465498(0xb6)+_0x3a7145+']':''),child_process['execSync'](_0x4f889d,{'cwd':_0x3a7145,..._0x4a0ea1});}function deleteFolderRecursive(_0x3473aa){const _0x3a8455=a9_0x12bb3a;fs['existsSync'](_0x3473aa)&&(fs[_0x3a8455(0xd3)](_0x3473aa)[_0x3a8455(0xcc)](_0x19182c=>{const _0x3b1fa0=_0x3a8455,_0xc2fae5=path['join'](_0x3473aa,_0x19182c);fs[_0x3b1fa0(0xcf)](_0xc2fae5)['isDirectory']()?deleteFolderRecursive(_0xc2fae5):fs[_0x3b1fa0(0xdd)](_0xc2fae5);}),fs['rmdirSync'](_0x3473aa));}function a9_0x2c72(_0x182041,_0x1aa5e8){_0x182041=_0x182041-0xb6;const _0x4f554c=a9_0x4f55();let _0x2c72b9=_0x4f554c[_0x182041];return _0x2c72b9;}function fileExists(_0x3ab628){const _0x25a1c8=a9_0x12bb3a;return fs[_0x25a1c8(0xbc)](_0x3ab628);}function readFile(_0x80a46f,_0xba19f9=a9_0x12bb3a(0xc2)){return fs['readFileSync'](_0x80a46f,_0xba19f9);}function writeFile(_0x5d8390,_0x3e7248,_0x1ac04a=a9_0x12bb3a(0xc2)){const _0x510b76=a9_0x12bb3a;fs[_0x510b76(0xdf)](_0x5d8390,_0x3e7248,_0x1ac04a);}function createDir(_0x25abf9){const _0xc9b696=a9_0x12bb3a;!fs[_0xc9b696(0xbc)](_0x25abf9)&&fs[_0xc9b696(0xd6)](_0x25abf9,{'recursive':!![]});}function isViteProject(_0x51934e){const _0x3f3644=a9_0x12bb3a;return fileExists(path[_0x3f3644(0xe1)](_0x51934e,_0x3f3644(0xc3)))||fileExists(path[_0x3f3644(0xe1)](_0x51934e,'vite.config.ts'))||fileExists(path[_0x3f3644(0xe1)](_0x51934e,_0x3f3644(0xce)));}function validateConfig(_0x5119e5,_0x2a062e){const _0x4a8e9b=a9_0x12bb3a,_0x134efa=_0x2a062e[_0x4a8e9b(0xd8)](_0x426edd=>!_0x5119e5[_0x426edd]);return{'isValid':_0x134efa[_0x4a8e9b(0xd1)]===0x0,'missingFields':_0x134efa};}function validateEnvironment(_0x1a230d,_0x4ea07a){const _0x1998b6=a9_0x12bb3a;return _0x1a230d[_0x1998b6(0xc5)]&&_0x1a230d[_0x1998b6(0xc5)][_0x4ea07a];}function DeleteDirAllFile(_0x2656fe,_0x4a970a){const _0x220d54=a9_0x12bb3a;let _0x143fbe=[];fs[_0x220d54(0xbc)](_0x2656fe)?(_0x143fbe=fs[_0x220d54(0xd3)](_0x2656fe),_0x143fbe[_0x220d54(0xcc)](function(_0x544563,_0x33704e){const _0xae97e8=_0x220d54;let _0x3f1723=path[_0xae97e8(0xe1)](_0x2656fe,_0x544563);fs[_0xae97e8(0xdc)](_0x3f1723)['isDirectory']()?DeleteDirAllFile(_0x3f1723):fs[_0xae97e8(0xdd)](_0x3f1723);}),fs[_0x220d54(0xd2)](_0x2656fe),_0x4a970a&&_0x4a970a()):_0x4a970a&&_0x4a970a();}function CopyFile(_0x245bea,_0x4dfe2a,_0x3fc609){const _0x2d500f=a9_0x12bb3a,_0x27d332=path[_0x2d500f(0xca)](_0x4dfe2a);!fs[_0x2d500f(0xbc)](_0x27d332)&&fs['mkdirSync'](_0x27d332,{'recursive':!![]});const _0x4f09c=fs[_0x2d500f(0xdb)](_0x245bea),_0x4a8002=fs[_0x2d500f(0xc9)](_0x4dfe2a);_0x4f09c[_0x2d500f(0xbb)](_0x4a8002),_0x4a8002['on'](_0x2d500f(0xc7),function(){_0x3fc609&&_0x3fc609();}),_0x4a8002['on']('error',function(_0x3f42c0){const _0x19c66b=_0x2d500f;logError(_0x19c66b(0xd4)+_0x3f42c0['message']),_0x3fc609&&_0x3fc609();});}function CopyFolder(_0x4df34a,_0x4959db,_0x28db90){const _0x309437=a9_0x12bb3a;!fs[_0x309437(0xbc)](_0x4959db)&&fs[_0x309437(0xd6)](_0x4959db,{'recursive':!![]}),fs['readdir'](_0x4df34a,function(_0x34e042,_0x335c97){const _0xa5d176=_0x309437;let _0x33c6a3=0x0;const _0x4a7921=function(){++_0x33c6a3===_0x335c97['length']&&_0x28db90&&_0x28db90();};if(_0x34e042){_0x4a7921();return;}_0x335c97[_0xa5d176(0xcc)](function(_0x550753){const _0x207ed2=_0xa5d176,_0x11b56e=path['join'](_0x4df34a,_0x550753),_0x43756c=path[_0x207ed2(0xe1)](_0x4959db,_0x550753);fs[_0x207ed2(0xd0)](_0x11b56e,function(_0x5374b8,_0x5d13d7){const _0xab89f2=_0x207ed2;if(_0x5d13d7[_0xab89f2(0xbd)]())fs[_0xab89f2(0xe3)](_0x43756c,{'recursive':!![]},function(_0x418a1c){const _0x1081a1=_0xab89f2;if(_0x418a1c){logError('创建目录失败:\x20'+_0x418a1c[_0x1081a1(0xe0)]);return;}CopyFolder(_0x11b56e,_0x43756c,_0x4a7921);});else{const _0xc5776d=fs[_0xab89f2(0xdb)](_0x11b56e),_0x19b3dd=fs[_0xab89f2(0xc9)](_0x43756c);_0xc5776d['pipe'](_0x19b3dd),_0x19b3dd['on'](_0xab89f2(0xc7),_0x4a7921),_0x19b3dd['on']('error',_0x4a7921);}});}),_0x335c97['length']===0x0&&_0x28db90&&_0x28db90();});}module[a9_0x12bb3a(0xb9)]={'CONSTANTS':CONSTANTS,'logInfo':logInfo,'logSuccess':logSuccess,'logWarning':logWarning,'logError':logError,'executeCommand':executeCommand,'deleteFolderRecursive':deleteFolderRecursive,'fileExists':fileExists,'readFile':readFile,'writeFile':writeFile,'createDir':createDir,'isViteProject':isViteProject,'validateConfig':validateConfig,'validateEnvironment':validateEnvironment,'DeleteDirAllFile':DeleteDirAllFile,'CopyFile':CopyFile,'CopyFolder':CopyFolder};
1
+ const a9_0x58f855=a9_0x561c;function a9_0x561c(_0x59dfad,_0x158614){_0x59dfad=_0x59dfad-0x1e8;const _0x4f33ac=a9_0x4f33();let _0x561cee=_0x4f33ac[_0x59dfad];return _0x561cee;}function a9_0x4f33(){const _0x5be2b6=['vite.config.mjs','filter','length','green','readFileSync','chalk','log','environment','rmdirSync','1058689kuWJAR','3484255fMkOjI','existsSync','child_process','pipe','9xRdRVA','文件复制失败:\x20','createWriteStream','12ynMoOf','yellow','jjb.config.js','start/src/main/resources/templates','13wXGpAv','isDirectory','vite.config.js','[工作目录:\x20','path','创建目录失败:\x20','forEach','2AbFTeS','execSync','lstatSync','mkdirSync','error','71997PUNuCc','dirname','unlinkSync','mkdir','10475280pfSlfb','309804jvPrMv','join','createReadStream','stat','statSync','6611164gZPqpv','执行命令:\x20','10aeuCNp','message','2525303jDBNeA','244MyxjsK','utf8','close','vite.config.ts'];a9_0x4f33=function(){return _0x5be2b6;};return a9_0x4f33();}(function(_0x5dc021,_0x18e774){const _0x52b606=a9_0x561c,_0x3a0db4=_0x5dc021();while(!![]){try{const _0x47a1d6=-parseInt(_0x52b606(0x217))/0x1*(parseInt(_0x52b606(0x1f6))/0x2)+parseInt(_0x52b606(0x1fb))/0x3*(-parseInt(_0x52b606(0x20a))/0x4)+parseInt(_0x52b606(0x218))/0x5*(parseInt(_0x52b606(0x1eb))/0x6)+parseInt(_0x52b606(0x205))/0x7+parseInt(_0x52b606(0x1ff))/0x8*(parseInt(_0x52b606(0x1e8))/0x9)+parseInt(_0x52b606(0x207))/0xa*(-parseInt(_0x52b606(0x209))/0xb)+parseInt(_0x52b606(0x200))/0xc*(parseInt(_0x52b606(0x1ef))/0xd);if(_0x47a1d6===_0x18e774)break;else _0x3a0db4['push'](_0x3a0db4['shift']());}catch(_0x298ad8){_0x3a0db4['push'](_0x3a0db4['shift']());}}}(a9_0x4f33,0xe0e5c));const fs=require('fs'),path=require(a9_0x58f855(0x1f3)),child_process=require(a9_0x58f855(0x21a)),chalk=require(a9_0x58f855(0x213)),CONSTANTS={'MAX_BUFFER_SIZE':0x3b9aca00,'SYNC_DELAY':0x3e8,'DEFAULT_BRANCH':'master','CONFIG_FILE_NAME':a9_0x58f855(0x1ed),'BUILD_OUTPUT_DIR':'dist','TEMPLATES_PATH':a9_0x58f855(0x1ee)};function logInfo(_0x29f92b,_0x1e3941=''){const _0x4bc83f=a9_0x58f855,_0x296c7d=chalk['blue']('ℹ'),_0x3d99ce=_0x1e3941?_0x296c7d+'\x20'+_0x29f92b+'\x20'+_0x1e3941:_0x296c7d+'\x20'+_0x29f92b;console[_0x4bc83f(0x214)](_0x3d99ce);}function logSuccess(_0x5242a2){const _0x95ebeb=a9_0x58f855;console[_0x95ebeb(0x214)](chalk[_0x95ebeb(0x211)]('✓\x20'+_0x5242a2));}function logWarning(_0x584d05){const _0x50cb95=a9_0x58f855;console[_0x50cb95(0x214)](chalk[_0x50cb95(0x1ec)]('⚠\x20'+_0x584d05));}function logError(_0x37ce65){console['log'](chalk['red']('✗\x20'+_0x37ce65));}function executeCommand(_0x951521,_0x328aa9,_0x3df097={}){const _0x30f917=a9_0x58f855;return logInfo(_0x30f917(0x206)+_0x951521,_0x328aa9?_0x30f917(0x1f2)+_0x328aa9+']':''),child_process[_0x30f917(0x1f7)](_0x951521,{'cwd':_0x328aa9,..._0x3df097});}function deleteFolderRecursive(_0x3bd27b){const _0x1273dc=a9_0x58f855;fs['existsSync'](_0x3bd27b)&&(fs['readdirSync'](_0x3bd27b)[_0x1273dc(0x1f5)](_0x2405bd=>{const _0x44796a=_0x1273dc,_0x1c508f=path[_0x44796a(0x201)](_0x3bd27b,_0x2405bd);fs[_0x44796a(0x1f8)](_0x1c508f)[_0x44796a(0x1f0)]()?deleteFolderRecursive(_0x1c508f):fs[_0x44796a(0x1fd)](_0x1c508f);}),fs[_0x1273dc(0x216)](_0x3bd27b));}function fileExists(_0x47e0d1){const _0x5d9306=a9_0x58f855;return fs[_0x5d9306(0x219)](_0x47e0d1);}function readFile(_0x2aae42,_0x1fd219='utf8'){const _0x5b0440=a9_0x58f855;return fs[_0x5b0440(0x212)](_0x2aae42,_0x1fd219);}function writeFile(_0x6d9beb,_0x3ceaa8,_0x94b94=a9_0x58f855(0x20b)){fs['writeFileSync'](_0x6d9beb,_0x3ceaa8,_0x94b94);}function createDir(_0x4bb6cb){const _0xbdbf2b=a9_0x58f855;!fs[_0xbdbf2b(0x219)](_0x4bb6cb)&&fs[_0xbdbf2b(0x1f9)](_0x4bb6cb,{'recursive':!![]});}function isViteProject(_0xf3fc71){const _0x40688d=a9_0x58f855;return fileExists(path[_0x40688d(0x201)](_0xf3fc71,_0x40688d(0x1f1)))||fileExists(path[_0x40688d(0x201)](_0xf3fc71,_0x40688d(0x20d)))||fileExists(path['join'](_0xf3fc71,_0x40688d(0x20e)));}function validateConfig(_0x49e0bc,_0x7ddd67){const _0x2f2683=a9_0x58f855,_0x2b488e=_0x7ddd67[_0x2f2683(0x20f)](_0x334db1=>!_0x49e0bc[_0x334db1]);return{'isValid':_0x2b488e[_0x2f2683(0x210)]===0x0,'missingFields':_0x2b488e};}function validateEnvironment(_0x936151,_0x3c32e0){const _0x595cda=a9_0x58f855;return _0x936151[_0x595cda(0x215)]&&_0x936151['environment'][_0x3c32e0];}function DeleteDirAllFile(_0x3e0ba7,_0x7dd16b){const _0x3050ac=a9_0x58f855;let _0x233f0e=[];fs[_0x3050ac(0x219)](_0x3e0ba7)?(_0x233f0e=fs['readdirSync'](_0x3e0ba7),_0x233f0e[_0x3050ac(0x1f5)](function(_0x581c32,_0x15f2b2){const _0x11b2f3=_0x3050ac;let _0x45f363=path['join'](_0x3e0ba7,_0x581c32);fs[_0x11b2f3(0x204)](_0x45f363)[_0x11b2f3(0x1f0)]()?DeleteDirAllFile(_0x45f363):fs[_0x11b2f3(0x1fd)](_0x45f363);}),fs[_0x3050ac(0x216)](_0x3e0ba7),_0x7dd16b&&_0x7dd16b()):_0x7dd16b&&_0x7dd16b();}function CopyFile(_0x475d3c,_0x5bfe8c,_0x281c4a){const _0x1eaa3a=a9_0x58f855,_0x475401=path[_0x1eaa3a(0x1fc)](_0x5bfe8c);!fs[_0x1eaa3a(0x219)](_0x475401)&&fs['mkdirSync'](_0x475401,{'recursive':!![]});const _0x5f1d26=fs['createReadStream'](_0x475d3c),_0x332db4=fs['createWriteStream'](_0x5bfe8c);_0x5f1d26['pipe'](_0x332db4),_0x332db4['on'](_0x1eaa3a(0x20c),function(){_0x281c4a&&_0x281c4a();}),_0x332db4['on'](_0x1eaa3a(0x1fa),function(_0x3a1ca0){const _0x5d25f0=_0x1eaa3a;logError(_0x5d25f0(0x1e9)+_0x3a1ca0[_0x5d25f0(0x208)]),_0x281c4a&&_0x281c4a();});}function CopyFolder(_0x5c68cf,_0x217789,_0x4b3d11){const _0x5d1bca=a9_0x58f855;!fs[_0x5d1bca(0x219)](_0x217789)&&fs[_0x5d1bca(0x1f9)](_0x217789,{'recursive':!![]}),fs['readdir'](_0x5c68cf,function(_0x323f51,_0x127006){const _0x277409=_0x5d1bca;let _0x28996b=0x0;const _0x2ad984=function(){const _0x59a4ec=a9_0x561c;++_0x28996b===_0x127006[_0x59a4ec(0x210)]&&_0x4b3d11&&_0x4b3d11();};if(_0x323f51){_0x2ad984();return;}_0x127006[_0x277409(0x1f5)](function(_0x2e2b4c){const _0x49188e=_0x277409,_0x4b0f4d=path['join'](_0x5c68cf,_0x2e2b4c),_0x2c1fb0=path[_0x49188e(0x201)](_0x217789,_0x2e2b4c);fs[_0x49188e(0x203)](_0x4b0f4d,function(_0x521bfa,_0x475011){const _0x2d3115=_0x49188e;if(_0x475011[_0x2d3115(0x1f0)]())fs[_0x2d3115(0x1fe)](_0x2c1fb0,{'recursive':!![]},function(_0x41efb8){const _0x55c95c=_0x2d3115;if(_0x41efb8){logError(_0x55c95c(0x1f4)+_0x41efb8[_0x55c95c(0x208)]);return;}CopyFolder(_0x4b0f4d,_0x2c1fb0,_0x2ad984);});else{const _0x2b288b=fs[_0x2d3115(0x202)](_0x4b0f4d),_0x1f1c85=fs[_0x2d3115(0x1ea)](_0x2c1fb0);_0x2b288b[_0x2d3115(0x21b)](_0x1f1c85),_0x1f1c85['on'](_0x2d3115(0x20c),_0x2ad984),_0x1f1c85['on']('error',_0x2ad984);}});}),_0x127006[_0x277409(0x210)]===0x0&&_0x4b3d11&&_0x4b3d11();});}module['exports']={'CONSTANTS':CONSTANTS,'logInfo':logInfo,'logSuccess':logSuccess,'logWarning':logWarning,'logError':logError,'executeCommand':executeCommand,'deleteFolderRecursive':deleteFolderRecursive,'fileExists':fileExists,'readFile':readFile,'writeFile':writeFile,'createDir':createDir,'isViteProject':isViteProject,'validateConfig':validateConfig,'validateEnvironment':validateEnvironment,'DeleteDirAllFile':DeleteDirAllFile,'CopyFile':CopyFile,'CopyFolder':CopyFolder};