@profoundlogic/codermake 1.3.1 → 1.4.1
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/README.md +12 -1
- package/dist/bin/index.js +1 -1
- package/dist/bin/preprocess-rpg-copy.js +1 -1
- package/dist/bin/rdf-to-dds.js +1 -1
- package/dist/lib/discovery.js +1 -1
- package/dist/lib/executor.js +1 -1
- package/dist/lib/generate-rdf-dds.js +1 -1
- package/dist/lib/license.js +1 -1
- package/dist/lib/makefile-generator.js +1 -1
- package/dist/lib/platform.js +1 -1
- package/dist/lib/preprocessor.js +1 -1
- package/dist/lib/rdf-to-post-data.js +1 -1
- package/dist/lib/rpg-copy-preprocessor.js +1 -1
- package/dist/lib/ssh.js +1 -1
- package/dist/lib/writer.js +1 -1
- package/dist/makefiles/base.mk +8 -0
- package/dist/makefiles/ibmi.mk +2 -2
- package/dist/makefiles/unix.mk +2 -2
- package/package.json +1 -1
- package/skills/codermake/SKILL.md +10 -2
- package/skills/codermake/references/file-types.md +16 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x5a93cf,_0x487adb){const _0x5a62ba=_0xb3b0,_0x5d5fe1=_0x5a93cf();while(!![]){try{const _0x59d040=-parseInt(_0x5a62ba(0xe1))/0x1+parseInt(_0x5a62ba(0xe2))/0x2+-parseInt(_0x5a62ba(0xfa))/0x3+-parseInt(_0x5a62ba(0xee))/0x4+parseInt(_0x5a62ba(0xdb))/0x5*(parseInt(_0x5a62ba(0xfc))/0x6)+-parseInt(_0x5a62ba(0xcc))/0x7*(parseInt(_0x5a62ba(0xd8))/0x8)+parseInt(_0x5a62ba(0xcb))/0x9;if(_0x59d040===_0x487adb)break;else _0x5d5fe1['push'](_0x5d5fe1['shift']());}catch(_0x80fb9a){_0x5d5fe1['push'](_0x5d5fe1['shift']());}}}(_0x3b19,0xc5fc5));import{readFileSync,writeFileSync,mkdirSync,copyFileSync,readdirSync}from'fs';import{dirname,join}from'path';import{randomUUID}from'crypto';export function detectFormat(_0x24dbed){const _0xfb5afd=_0xb3b0,_0x1add3b={};_0x1add3b['NYTUG']='fixed';const _0xc52f6e=_0x1add3b;if(/^\*\*free$/i['test'](_0x24dbed[_0xfb5afd(0xe9)]()))return'free';return _0xc52f6e[_0xfb5afd(0xed)];}export function extractDirective(_0x57bd41,_0xfc83d1){const _0x1456cc=_0xb3b0,_0x2f598e={};_0x2f598e[_0x1456cc(0xf4)]=function(_0x3b04c9,_0x58442b){return _0x3b04c9+_0x58442b;},_0x2f598e['jligu']=function(_0x253e45,_0x4c5a5a){return _0x253e45<_0x4c5a5a;},_0x2f598e[_0x1456cc(0x102)]=function(_0x73ebc7,_0x4883a3){return _0x73ebc7!==_0x4883a3;},_0x2f598e[_0x1456cc(0x10e)]=function(_0x41efc4,_0x1b7502){return _0x41efc4===_0x1b7502;};const _0x5ca974=_0x2f598e;let _0x5a94d0,_0x4b2abb;if(_0xfc83d1===_0x1456cc(0x104)){const _0x1b880c=_0x57bd41[_0x1456cc(0xec)](/^\s*\/(copy|include) (\S)/i);if(!_0x1b880c)return null;const _0x285f67=_0x57bd41[_0x1456cc(0x107)]();if(_0x285f67['startsWith']('//'))return null;_0x5a94d0=_0x1b880c[0x1][_0x1456cc(0xf6)](),_0x4b2abb=_0x57bd41[_0x1456cc(0xe5)](_0x5ca974[_0x1456cc(0xf4)](_0x1b880c[_0x1456cc(0xf1)],_0x1b880c[0x0][_0x1456cc(0xf9)])-0x1);}else{if(_0x5ca974[_0x1456cc(0x110)](_0x57bd41[_0x1456cc(0xf9)],0x7))return null;if(_0x5ca974[_0x1456cc(0x102)](_0x57bd41[0x6],'/'))return null;const _0x420744=_0x57bd41[_0x1456cc(0xe5)](0x7),_0x3a1148=_0x420744[_0x1456cc(0xec)](/^(copy|include) (\S)/i);if(!_0x3a1148)return null;_0x5a94d0=_0x3a1148[0x1][_0x1456cc(0xf6)](),_0x4b2abb=_0x420744[_0x1456cc(0xe5)](_0x3a1148[0x0][_0x1456cc(0xf9)]-0x1);}let _0x39d2f2;if(_0x4b2abb[_0x1456cc(0xfb)]('\x27')){const _0x4758f4=_0x4b2abb[_0x1456cc(0xe0)]('\x27',0x1);_0x39d2f2=_0x5ca974['XcZeF'](_0x4758f4,-0x1)?_0x4b2abb[_0x1456cc(0xfe)]():_0x4b2abb['substring'](0x0,_0x5ca974[_0x1456cc(0xf4)](_0x4758f4,0x1));}else{if(_0x4b2abb[_0x1456cc(0xfb)]('\x22')){const _0x398cef=_0x4b2abb['indexOf']('\x22',0x1);_0x39d2f2=_0x398cef===-0x1?_0x4b2abb[_0x1456cc(0xfe)]():_0x4b2abb['substring'](0x0,_0x398cef+0x1);}else _0x39d2f2=_0x4b2abb[_0x1456cc(0xf0)](/\s/)[0x0];}const _0x39fa77={};return _0x39fa77[_0x1456cc(0xef)]=_0x5a94d0,_0x39fa77[_0x1456cc(0x10c)]=_0x39d2f2,_0x39fa77;}export function classifyDirectiveOperand(_0x2be67a){const _0x5dac9a=_0xb3b0,_0x1d523b={};_0x1d523b[_0x5dac9a(0xf3)]=_0x5dac9a(0x108),_0x1d523b[_0x5dac9a(0xd0)]=function(_0x263b92,_0xb04e5e){return _0x263b92+_0xb04e5e;},_0x1d523b[_0x5dac9a(0xfd)]=function(_0x4cf753,_0x47cd31){return _0x4cf753!==_0x47cd31;},_0x1d523b[_0x5dac9a(0xf5)]=_0x5dac9a(0xf2);const _0x4a49a8=_0x1d523b;if(_0x2be67a[_0x5dac9a(0xfb)]('\x27')||_0x2be67a['startsWith']('\x22')){const _0x50ef8d={};return _0x50ef8d[_0x5dac9a(0x101)]=_0x4a49a8['FNpQY'],_0x50ef8d;}if(_0x2be67a[_0x5dac9a(0xde)](',')){const _0x453106=_0x2be67a['indexOf'](','),_0x1a63f3=_0x2be67a['substring'](0x0,_0x453106),_0x11ee9d=_0x2be67a[_0x5dac9a(0xe5)](_0x4a49a8['iRdDW'](_0x453106,0x1)),_0x16f9e6=_0x1a63f3[_0x5dac9a(0xe0)]('/');if(_0x4a49a8[_0x5dac9a(0xfd)](_0x16f9e6,-0x1)){const _0x1872ba=_0x1a63f3[_0x5dac9a(0xe5)](0x0,_0x16f9e6),_0x29b672=/^\*libl$/i['test'](_0x1872ba)?null:_0x1872ba;return{'type':_0x4a49a8['xssaV'],'library':_0x29b672,'fileName':_0x1a63f3[_0x5dac9a(0xe5)](_0x16f9e6+0x1),'memberName':_0x11ee9d};}const _0x513476={};return _0x513476[_0x5dac9a(0x101)]=_0x5dac9a(0xf2),_0x513476['library']=null,_0x513476['fileName']=_0x1a63f3,_0x513476[_0x5dac9a(0xe4)]=_0x11ee9d,_0x513476;}if(_0x2be67a[_0x5dac9a(0xde)]('/')){const _0x2e9ff1={};return _0x2e9ff1[_0x5dac9a(0x101)]=_0x4a49a8['FNpQY'],_0x2e9ff1;}if(/\.rpgle$/i['test'](_0x2be67a)||/\.sqlrpgle$/i[_0x5dac9a(0xd9)](_0x2be67a)){const _0x2b8faf={};return _0x2b8faf[_0x5dac9a(0x101)]=_0x5dac9a(0x108),_0x2b8faf;}const _0x1969b7={};return _0x1969b7['type']=_0x4a49a8['xssaV'],_0x1969b7[_0x5dac9a(0xd5)]=null,_0x1969b7[_0x5dac9a(0xdd)]=null,_0x1969b7[_0x5dac9a(0xe4)]=_0x2be67a,_0x1969b7;}function findFileInsensitive(_0xe94f44,_0x5323c3){const _0x4c389c=_0xb3b0;let _0x388c76;try{_0x388c76=readdirSync(_0xe94f44);}catch{return null;}if(_0x388c76[_0x4c389c(0xde)](_0x5323c3))return _0x5323c3;const _0x66cb9=_0x5323c3[_0x4c389c(0xf6)]();return _0x388c76[_0x4c389c(0x100)](_0xd39d58=>_0xd39d58[_0x4c389c(0xf6)]()===_0x66cb9)||null;}function findDirInsensitive(_0x1e14af,_0x5a263d){const _0x415a49=_0xb3b0;let _0x13e8bd;try{_0x13e8bd=readdirSync(_0x1e14af);}catch{return null;}if(_0x13e8bd['includes'](_0x5a263d))return _0x5a263d;const _0x29c2c7=_0x5a263d[_0x415a49(0xf6)]();return _0x13e8bd[_0x415a49(0x100)](_0x828a0a=>_0x828a0a[_0x415a49(0xf6)]()===_0x29c2c7)||null;}export function resolveSourceMember(_0x2eac72,_0x2f48f8){const _0x1f811c=_0xb3b0,_0xbcc0e1={};_0xbcc0e1[_0x1f811c(0xe6)]=function(_0x4582e0,_0x1f4746){return _0x4582e0===_0x1f4746;},_0xbcc0e1['pmOOe']='qrpglesrc',_0xbcc0e1[_0x1f811c(0xd7)]='.rpgle',_0xbcc0e1['VdOuL']=_0x1f811c(0x109);const _0x42a06f=_0xbcc0e1,{library:_0x2fb892,fileName:_0x47a2f2,memberName:_0x1126a4}=_0x2eac72;let _0x623055;if(_0x42a06f[_0x1f811c(0xe6)](_0x47a2f2,null))_0x623055=_0x42a06f[_0x1f811c(0xda)];else _0x2fb892!==null?_0x623055=_0x2fb892+'/'+_0x47a2f2:_0x623055=_0x47a2f2;const _0x481006=_0x623055[_0x1f811c(0xf0)]('/');let _0x2fd2fc=_0x2f48f8;const _0x28c4b3=[];for(const _0x4c115b of _0x481006){const _0xed7aad=findDirInsensitive(_0x2fd2fc,_0x4c115b);if(!_0xed7aad)throw new Error(_0x1f811c(0xd1)+_0x623055+_0x1f811c(0xeb)+_0x4c115b+_0x1f811c(0xce)+_0x2fd2fc+'\x27)');_0x28c4b3[_0x1f811c(0xcd)](_0xed7aad),_0x2fd2fc=join(_0x2fd2fc,_0xed7aad);}const _0x7d7a9a=_0x28c4b3[_0x1f811c(0xd3)]('/'),_0xd2ef9e=[_0x42a06f[_0x1f811c(0xd7)],_0x42a06f[_0x1f811c(0xdf)]];for(const _0x5a1bf8 of _0xd2ef9e){const _0x13e10c=_0x1126a4+_0x5a1bf8,_0x3805b6=findFileInsensitive(join(_0x2f48f8,_0x7d7a9a),_0x13e10c);if(_0x3805b6)return _0x7d7a9a+'/'+_0x3805b6;}throw new Error('Source\x20member\x20not\x20found:\x20'+_0x1126a4+_0x1f811c(0x105)+_0x7d7a9a+_0x1f811c(0xd2));}export function preprocessFileContent(_0x4436af,_0x28f21f){const _0xb570ee=_0xb3b0,_0x3d2eda={'vsENk':function(_0x117742,_0x3c7534){return _0x117742===_0x3c7534;},'WzYcT':function(_0x1f50f3,_0xcd1ecd){return _0x1f50f3<_0xcd1ecd;},'UmgXn':function(_0x4bb4d2,_0x2c1bbd){return _0x4bb4d2(_0x2c1bbd);},'amNqx':function(_0xa21dcb,_0x1719a6,_0x1da896){return _0xa21dcb(_0x1719a6,_0x1da896);},'WrvAs':function(_0x58d25e,_0x357b0f){return _0x58d25e+_0x357b0f;},'RmYhn':function(_0x2cf30a,_0x5054b3){return _0x2cf30a===_0x5054b3;},'FQKmn':_0xb570ee(0x104),'yrNNH':function(_0x3ecd61,_0x3a9479){return _0x3ecd61+_0x3a9479;}},_0x2f64ef=_0x4436af['split']('\x0a'),_0x51b1ef={};_0x51b1ef[_0xb570ee(0x10b)]=_0x4436af,_0x51b1ef[_0xb570ee(0x111)]=![];if(_0x3d2eda[_0xb570ee(0xe3)](_0x2f64ef[_0xb570ee(0xf9)],0x0))return _0x51b1ef;const _0x3f9d77=detectFormat(_0x2f64ef[0x0]);let _0xff2bd9=![];const _0x34e204=[];for(let _0x416f65=0x0;_0x3d2eda[_0xb570ee(0xe7)](_0x416f65,_0x2f64ef[_0xb570ee(0xf9)]);_0x416f65++){const _0x3a71d7=_0x2f64ef[_0x416f65],_0xa588d=extractDirective(_0x3a71d7,_0x3f9d77);if(!_0xa588d){_0x34e204[_0xb570ee(0xcd)](_0x3a71d7);continue;}const _0x2a7d08=_0x3d2eda[_0xb570ee(0x106)](classifyDirectiveOperand,_0xa588d[_0xb570ee(0x10c)]);if(_0x2a7d08['type']===_0xb570ee(0x108)){_0x34e204[_0xb570ee(0xcd)](_0x3a71d7);continue;}let _0x5175da;try{_0x5175da=_0x3d2eda[_0xb570ee(0x10a)](resolveSourceMember,_0x2a7d08,_0x28f21f);}catch(_0x3f1d1c){const _0x5902bb=_0x3d2eda[_0xb570ee(0xcf)](_0x416f65,0x1);throw new Error(_0x3f1d1c[_0xb570ee(0x10d)]+'\x0a'+(_0xb570ee(0xe8)+_0x5902bb+'\x0a')+('\x20\x20Directive:\x20'+_0x3a71d7[_0xb570ee(0x107)]()));}let _0xd9dbc6;if(_0x3d2eda['RmYhn'](_0x3f9d77,_0x3d2eda[_0xb570ee(0xd4)])){const _0x1c566a=_0x3a71d7['match'](/^(\s*\/)(copy|include) /i),_0x27552a=_0x1c566a[0x1],_0x530c16=_0x1c566a[0x2],_0x454196=_0x3a71d7['substring'](_0x1c566a[0x0][_0xb570ee(0xf9)]+_0xa588d[_0xb570ee(0x10c)][_0xb570ee(0xf9)]);_0xd9dbc6=''+_0x27552a+_0x530c16+'\x20'+_0x5175da+_0x454196;}else{const _0x4be3aa=_0x3a71d7['substring'](0x0,0x6),_0x17b2dc=_0x3a71d7[_0xb570ee(0xe5)](0x7)['match'](/^(copy|include) /i),_0xc4bc46=_0x17b2dc[0x1],_0x1ba5fb=_0x3d2eda[_0xb570ee(0xcf)](0x7,_0x17b2dc[0x0][_0xb570ee(0xf9)]),_0x50e8b9=_0x3a71d7[_0xb570ee(0xe5)](_0x3d2eda[_0xb570ee(0xc9)](_0x1ba5fb,_0xa588d['operand'][_0xb570ee(0xf9)]));_0xd9dbc6=_0x4be3aa+'/'+_0xc4bc46+'\x20'+_0x5175da+_0x50e8b9;}_0x34e204['push'](_0xd9dbc6),_0xff2bd9=!![];}return{'content':_0x34e204[_0xb570ee(0xd3)]('\x0a'),'modified':_0xff2bd9};}function _0xb3b0(_0x478ec4,_0xfc8789){_0x478ec4=_0x478ec4-0xc9;const _0x3b1992=_0x3b19();let _0xb3b09a=_0x3b1992[_0x478ec4];if(_0xb3b0['MTPsGH']===undefined){var _0x281690=function(_0xe9771f){const _0x5893c6='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x392651='',_0x4cb252='';for(let _0x2cadb5=0x0,_0x38b65b,_0x275e11,_0x1e6eb4=0x0;_0x275e11=_0xe9771f['charAt'](_0x1e6eb4++);~_0x275e11&&(_0x38b65b=_0x2cadb5%0x4?_0x38b65b*0x40+_0x275e11:_0x275e11,_0x2cadb5++%0x4)?_0x392651+=String['fromCharCode'](0xff&_0x38b65b>>(-0x2*_0x2cadb5&0x6)):0x0){_0x275e11=_0x5893c6['indexOf'](_0x275e11);}for(let _0x4f17ad=0x0,_0x464e45=_0x392651['length'];_0x4f17ad<_0x464e45;_0x4f17ad++){_0x4cb252+='%'+('00'+_0x392651['charCodeAt'](_0x4f17ad)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4cb252);};_0xb3b0['jciJFm']=_0x281690,_0xb3b0['UlxWuk']={},_0xb3b0['MTPsGH']=!![];}const _0x2468eb=_0x3b1992[0x0],_0x3316ec=_0x478ec4+_0x2468eb,_0x1715a1=_0xb3b0['UlxWuk'][_0x3316ec];return!_0x1715a1?(_0xb3b09a=_0xb3b0['jciJFm'](_0xb3b09a),_0xb3b0['UlxWuk'][_0x3316ec]=_0xb3b09a):_0xb3b09a=_0x1715a1,_0xb3b09a;}export function preprocessFile(_0x407598,_0x1c8a50){const _0x51219b=_0xb3b0,_0x5224ef={'jmQdF':function(_0x3db05a,_0x479d69,_0x5d52b5){return _0x3db05a(_0x479d69,_0x5d52b5);}};if(!/\.(rpgle|sqlrpgle)$/i['test'](_0x407598)){const _0x455dc2={};return _0x455dc2[_0x51219b(0x111)]=![],_0x455dc2;}const _0x1fb5b8=readFileSync(_0x407598,_0x51219b(0x10f));try{return _0x5224ef[_0x51219b(0xd6)](preprocessFileContent,_0x1fb5b8,_0x1c8a50);}catch(_0x59f0d9){const _0xda2fee=_0x59f0d9[_0x51219b(0x10d)][_0x51219b(0xea)](/^(.*\n {2})File: /,_0x51219b(0xca)+_0x407598+',\x20');throw new Error(_0xda2fee);}}function _0x3b19(){const _0x33212e=['A2v5D29Yza','C3bSAxq','Aw5KzxG','BwvTyMvY','rK5WuvK','BKnsuuO','EhnZyvy','Dg9mB3DLCKnHC2u','vKH1D2K','BMvLzgvK','BgvUz3rO','mZG3ntC5owLjvKXotW','C3rHCNrZv2L0Aa','nMjqyNnABa','qLfSzeW','DhjPBq','EgTTrxy','zMLUza','DhLWzq','tKjswg4','sNzNtKm','zNjLzq','igLUia','vw1Nwg4','DhjPBvn0yxj0','AwzZ','lNnXBhjWz2XL','yw1oCxG','y29UDgvUDa','B3bLCMfUza','BwvZC2fNzq','wgnAzuy','DxrMoa','AMXPz3u','Bw9KAwzPzwq','ExjotKG','jdfgAwXLoIa','nda1mdG0otz2t2jKq3K','ndK2m2HuzLDqCa','ChvZAa','jYbPBIaN','v3j2qxm','AvjKrfC','rgLYzwn0B3j5ig5VDcbMB3vUzdOG','lYaODhjPzwqGlNjWz2XLlcaUC3fSCNbNBguP','AM9PBG','rLflBw4','BgLICMfYEq','AM1rzey','BKLZrxG','mtyWmJrIBujRB3e','DgvZDa','Cg1pt2u','mtq1nJu3mfHfEev3sG','CMvJDxjZAxzL','zMLSzu5HBwu','Aw5JBhvKzxm','vMrpDuW','Aw5KzxHpzG','mJeWodC0s2zXExfZ','nZaXmtK4EKvYqvnt','DNnftMS','BwvTyMvYtMfTzq','C3vIC3rYAw5N','sNLfyve','v3Pzy1q','icbgAwXLoIbSAw5Lia','DhjPBuvUza','CMvWBgfJzq','icHSB29RAw5NigzVCIaN','Bwf0y2G','tLLuvuC','ntyZntG5nMDdzvPgDW'];_0x3b19=function(){return _0x33212e;};return _0x3b19();}export function preprocessFiles(_0x39bca6,_0x5d5bee,_0x4d0878){const _0x444831=_0xb3b0,_0x10c8c5={'xkmEv':function(_0x3f43f2,_0x4db84d){return _0x3f43f2<_0x4db84d;},'VHuwi':function(_0x2a1217,_0x7ae17c,_0x14bafd){return _0x2a1217(_0x7ae17c,_0x14bafd);},'JvgNC':function(_0x440a48,_0x502107,_0x15d63f){return _0x440a48(_0x502107,_0x15d63f);}},_0x94f18e=[];let _0x2ee83c=![];for(const _0x8248f5 of _0x39bca6){const _0x5c72b0=join(_0x5d5bee,_0x8248f5),_0x9dcec9=preprocessFile(_0x5c72b0,_0x5d5bee),_0x57301e={'filePath':_0x8248f5,..._0x9dcec9};_0x94f18e[_0x444831(0xcd)](_0x57301e);if(_0x9dcec9['modified'])_0x2ee83c=!![];}if(!_0x2ee83c){const _0x3ed0c6={};return _0x3ed0c6['needed']=![],_0x3ed0c6['sourceRoot']='.',_0x3ed0c6;}const _0x5768b2=_0x4d0878+'-'+randomUUID();for(let _0x37ba6b=0x0;_0x10c8c5[_0x444831(0xff)](_0x37ba6b,_0x39bca6[_0x444831(0xf9)]);_0x37ba6b++){const _0x3c11c1=_0x39bca6[_0x37ba6b],_0x32b192=_0x94f18e[_0x37ba6b],_0x3f9b98=join(_0x5768b2,_0x3c11c1),_0x302f35={};_0x302f35[_0x444831(0xdc)]=!![],_0x10c8c5[_0x444831(0xf7)](mkdirSync,dirname(_0x3f9b98),_0x302f35),_0x32b192[_0x444831(0x111)]?writeFileSync(_0x3f9b98,_0x32b192[_0x444831(0x10b)]):copyFileSync(_0x10c8c5[_0x444831(0x103)](join,_0x5d5bee,_0x3c11c1),_0x3f9b98);}const _0x3708b4={};return _0x3708b4[_0x444831(0xf8)]=!![],_0x3708b4['sourceRoot']=_0x5768b2,_0x3708b4;}
|
|
1
|
+
(function(_0x586783,_0x527fec){const _0xa08ebe=_0x470a,_0x439ca0=_0x586783();while(!![]){try{const _0x18ca21=parseInt(_0xa08ebe(0xaf))/0x1*(parseInt(_0xa08ebe(0x9b))/0x2)+-parseInt(_0xa08ebe(0x97))/0x3*(-parseInt(_0xa08ebe(0x7d))/0x4)+parseInt(_0xa08ebe(0xb5))/0x5*(-parseInt(_0xa08ebe(0xb6))/0x6)+parseInt(_0xa08ebe(0xa3))/0x7+parseInt(_0xa08ebe(0x8a))/0x8+parseInt(_0xa08ebe(0x8c))/0x9+-parseInt(_0xa08ebe(0x77))/0xa*(parseInt(_0xa08ebe(0x81))/0xb);if(_0x18ca21===_0x527fec)break;else _0x439ca0['push'](_0x439ca0['shift']());}catch(_0x4db8c5){_0x439ca0['push'](_0x439ca0['shift']());}}}(_0xbd47,0x89a40));import{readFileSync,writeFileSync,mkdirSync,copyFileSync,readdirSync}from'fs';import{dirname,join}from'path';import{randomUUID}from'crypto';export function detectFormat(_0x22b577){const _0x3a8a00=_0x470a;if(/^\*\*free$/i[_0x3a8a00(0x9f)](_0x22b577[_0x3a8a00(0x85)]()))return _0x3a8a00(0x99);return _0x3a8a00(0xb4);}export function extractDirective(_0x333324,_0x331196){const _0x1cdf73=_0x470a,_0x576a29={};_0x576a29['AwpWp']=function(_0xe1ffa,_0x52976a){return _0xe1ffa<_0x52976a;},_0x576a29[_0x1cdf73(0xab)]=function(_0x27221e,_0x54ff0b){return _0x27221e-_0x54ff0b;},_0x576a29[_0x1cdf73(0xa6)]=function(_0x23df91,_0x5394c2){return _0x23df91===_0x5394c2;},_0x576a29['jLKWX']=function(_0x1e2d52,_0x15c909){return _0x1e2d52===_0x15c909;};const _0xdb9175=_0x576a29;let _0x2a0bae,_0x3612cc;if(_0x331196===_0x1cdf73(0x99)){const _0x7225d4=_0x333324[_0x1cdf73(0xad)](/^\s*\/(copy|include) (\S)/i);if(!_0x7225d4)return null;const _0xd9d903=_0x333324[_0x1cdf73(0x87)]();if(_0xd9d903['startsWith']('//'))return null;_0x2a0bae=_0x7225d4[0x1]['toLowerCase'](),_0x3612cc=_0x333324[_0x1cdf73(0x91)](_0x7225d4[_0x1cdf73(0xa2)]+_0x7225d4[0x0][_0x1cdf73(0xb9)]-0x1);}else{if(_0xdb9175[_0x1cdf73(0xac)](_0x333324['length'],0x7))return null;if(_0x333324[0x6]!=='/')return null;const _0xd51e41=_0x333324[_0x1cdf73(0x91)](0x7),_0x44ed65=_0xd51e41[_0x1cdf73(0xad)](/^(copy|include) (\S)/i);if(!_0x44ed65)return null;_0x2a0bae=_0x44ed65[0x1][_0x1cdf73(0x98)](),_0x3612cc=_0xd51e41['substring'](_0xdb9175[_0x1cdf73(0xab)](_0x44ed65[0x0][_0x1cdf73(0xb9)],0x1));}let _0xe042a4;if(_0x3612cc['startsWith']('\x27')){const _0x455a95=_0x3612cc[_0x1cdf73(0x9a)]('\x27',0x1);_0xe042a4=_0xdb9175[_0x1cdf73(0xa6)](_0x455a95,-0x1)?_0x3612cc['trim']():_0x3612cc['substring'](0x0,_0x455a95+0x1);}else{if(_0x3612cc[_0x1cdf73(0x8d)]('\x22')){const _0x5d9451=_0x3612cc['indexOf']('\x22',0x1);_0xe042a4=_0xdb9175[_0x1cdf73(0x75)](_0x5d9451,-0x1)?_0x3612cc['trim']():_0x3612cc[_0x1cdf73(0x91)](0x0,_0x5d9451+0x1);}else _0xe042a4=_0x3612cc[_0x1cdf73(0xa9)](/\s/)[0x0];}const _0x72683e={};return _0x72683e['keyword']=_0x2a0bae,_0x72683e[_0x1cdf73(0x79)]=_0xe042a4,_0x72683e;}export function classifyDirectiveOperand(_0xb724e9){const _0x1c7991=_0x470a,_0x36c902={};_0x36c902['PBPJV']=function(_0x4fce4a,_0x3cacb0){return _0x4fce4a!==_0x3cacb0;},_0x36c902[_0x1c7991(0xa1)]=_0x1c7991(0x7f),_0x36c902[_0x1c7991(0xb8)]=_0x1c7991(0xae);const _0x529eb8=_0x36c902;if(_0xb724e9['startsWith']('\x27')||_0xb724e9[_0x1c7991(0x8d)]('\x22')){const _0x557edd={};return _0x557edd['type']='ifs',_0x557edd;}if(_0xb724e9['includes'](',')){const _0x50ba0c=_0xb724e9[_0x1c7991(0x9a)](','),_0x530e4a=_0xb724e9[_0x1c7991(0x91)](0x0,_0x50ba0c),_0x440e22=_0xb724e9[_0x1c7991(0x91)](_0x50ba0c+0x1),_0x3f3982=_0x530e4a[_0x1c7991(0x9a)]('/');if(_0x529eb8[_0x1c7991(0xa7)](_0x3f3982,-0x1)){const _0xb25685=_0x530e4a[_0x1c7991(0x91)](0x0,_0x3f3982),_0x1352a6=/^\*libl$/i['test'](_0xb25685)?null:_0xb25685;return{'type':_0x529eb8[_0x1c7991(0xa1)],'library':_0x1352a6,'fileName':_0x530e4a[_0x1c7991(0x91)](_0x3f3982+0x1),'memberName':_0x440e22};}const _0x23b4d4={};return _0x23b4d4['type']=_0x1c7991(0x7f),_0x23b4d4[_0x1c7991(0x92)]=null,_0x23b4d4[_0x1c7991(0x8f)]=_0x530e4a,_0x23b4d4[_0x1c7991(0x84)]=_0x440e22,_0x23b4d4;}if(_0xb724e9['includes']('/')){const _0x21e5ee={};return _0x21e5ee[_0x1c7991(0xa0)]=_0x529eb8[_0x1c7991(0xb8)],_0x21e5ee;}if(/\.rpgle$/i[_0x1c7991(0x9f)](_0xb724e9)||/\.sqlrpgle$/i['test'](_0xb724e9)){const _0x1f0083={};return _0x1f0083[_0x1c7991(0xa0)]=_0x1c7991(0xae),_0x1f0083;}const _0x30d509={};return _0x30d509[_0x1c7991(0xa0)]=_0x1c7991(0x7f),_0x30d509[_0x1c7991(0x92)]=null,_0x30d509[_0x1c7991(0x8f)]=null,_0x30d509['memberName']=_0xb724e9,_0x30d509;}function findFileInsensitive(_0x48c5ac,_0x5c70e1){const _0x4e4d01=_0x470a;let _0x10549b;try{_0x10549b=readdirSync(_0x48c5ac);}catch{return null;}if(_0x10549b['includes'](_0x5c70e1))return _0x5c70e1;const _0x4a36d4=_0x5c70e1[_0x4e4d01(0x98)]();return _0x10549b[_0x4e4d01(0x8e)](_0x5b4f87=>_0x5b4f87[_0x4e4d01(0x98)]()===_0x4a36d4)||null;}function findDirInsensitive(_0x273136,_0x1f46c9){const _0x49f4e9=_0x470a,_0x195127={'rhNoD':function(_0x2d1f04,_0x524dad){return _0x2d1f04(_0x524dad);}};let _0x2bf6cb;try{_0x2bf6cb=_0x195127[_0x49f4e9(0x7e)](readdirSync,_0x273136);}catch{return null;}if(_0x2bf6cb[_0x49f4e9(0x83)](_0x1f46c9))return _0x1f46c9;const _0x3718d2=_0x1f46c9[_0x49f4e9(0x98)]();return _0x2bf6cb[_0x49f4e9(0x8e)](_0x3f01c6=>_0x3f01c6[_0x49f4e9(0x98)]()===_0x3718d2)||null;}export function resolveSourceMember(_0x1fc3d9,_0x3feb2e){const _0x327a41=_0x470a,_0x213c75={'epSAb':_0x327a41(0x88),'UYxNh':function(_0x483341,_0x315417,_0x32cf4a){return _0x483341(_0x315417,_0x32cf4a);},'GGfSE':'.rpgle','PUEcK':_0x327a41(0x95),'VtZWu':function(_0x2c820c,_0x617cd2){return _0x2c820c+_0x617cd2;}},{library:_0x58d304,fileName:_0x554bda,memberName:_0x2f1336}=_0x1fc3d9;let _0x477048;if(_0x554bda===null)_0x477048=_0x213c75[_0x327a41(0xb1)];else _0x58d304!==null?_0x477048=_0x58d304+'/'+_0x554bda:_0x477048=_0x554bda;const _0x3447e3=_0x477048[_0x327a41(0xa9)]('/');let _0x484054=_0x3feb2e;const _0x3745a6=[];for(const _0x4d6a16 of _0x3447e3){const _0x2d349f=findDirInsensitive(_0x484054,_0x4d6a16);if(!_0x2d349f)throw new Error(_0x327a41(0xb0)+_0x477048+_0x327a41(0x93)+_0x4d6a16+_0x327a41(0x82)+_0x484054+'\x27)');_0x3745a6[_0x327a41(0x78)](_0x2d349f),_0x484054=_0x213c75[_0x327a41(0x80)](join,_0x484054,_0x2d349f);}const _0x27fb4e=_0x3745a6[_0x327a41(0x9e)]('/'),_0x4a643b=[_0x213c75['GGfSE'],_0x213c75[_0x327a41(0x9c)]];for(const _0xd1c272 of _0x4a643b){const _0x5acb8d=_0x213c75[_0x327a41(0x89)](_0x2f1336,_0xd1c272),_0x46260d=_0x213c75[_0x327a41(0x80)](findFileInsensitive,join(_0x3feb2e,_0x27fb4e),_0x5acb8d);if(_0x46260d)return _0x27fb4e+'/'+_0x46260d;}throw new Error(_0x327a41(0x7a)+_0x2f1336+_0x327a41(0x94)+_0x27fb4e+'/\x20(tried\x20.rpgle,\x20.sqlrpgle)');}export function preprocessFileContent(_0x76d85d,_0x441f15){const _0x50440f=_0x470a,_0x57d688={'kQwdP':function(_0x2c843a,_0x2f49f5){return _0x2c843a(_0x2f49f5);},'rUjSa':function(_0xc6ed1,_0xa39ac8,_0x27e288){return _0xc6ed1(_0xa39ac8,_0x27e288);},'gScPa':function(_0x5d8ed1,_0x46b3e2){return _0x5d8ed1===_0x46b3e2;},'WWhjA':_0x50440f(0xae),'JTPIG':function(_0x1bf130,_0x4c3cdc){return _0x1bf130+_0x4c3cdc;},'IhhNU':_0x50440f(0x99),'oKwKk':function(_0x1f332d,_0x263e07){return _0x1f332d+_0x263e07;}},_0x5eef50=_0x76d85d[_0x50440f(0xa9)]('\x0a'),_0x30ba26={};_0x30ba26[_0x50440f(0x72)]=_0x76d85d,_0x30ba26[_0x50440f(0x90)]=![];if(_0x5eef50[_0x50440f(0xb9)]===0x0)return _0x30ba26;const _0x53acb7=_0x57d688[_0x50440f(0xaa)](detectFormat,_0x5eef50[0x0]);let _0x39eb4a=![];const _0xfd8723=[];for(let _0x3ee427=0x0;_0x3ee427<_0x5eef50['length'];_0x3ee427++){const _0x3141aa=_0x5eef50[_0x3ee427],_0x4ee649=_0x57d688[_0x50440f(0x7c)](extractDirective,_0x3141aa,_0x53acb7);if(!_0x4ee649){_0xfd8723[_0x50440f(0x78)](_0x3141aa);continue;}const _0x791da1=classifyDirectiveOperand(_0x4ee649[_0x50440f(0x79)]);if(_0x57d688[_0x50440f(0x76)](_0x791da1[_0x50440f(0xa0)],_0x57d688[_0x50440f(0xb2)])){_0xfd8723['push'](_0x3141aa);continue;}let _0x4e157a;try{_0x4e157a=resolveSourceMember(_0x791da1,_0x441f15);}catch(_0x5b7855){const _0xaab838=_0x3ee427+0x1;throw new Error(_0x57d688['JTPIG'](_0x5b7855[_0x50440f(0xb7)]+'\x0a'+(_0x50440f(0x86)+_0xaab838+'\x0a'),_0x50440f(0xa5)+_0x3141aa[_0x50440f(0x87)]()));}let _0x483478;if(_0x57d688[_0x50440f(0x76)](_0x53acb7,_0x57d688[_0x50440f(0xa4)])){const _0x40f6b1=_0x3141aa[_0x50440f(0xad)](/^(\s*\/)(copy|include) /i),_0x5aeede=_0x40f6b1[0x1],_0xaf1ec6=_0x40f6b1[0x2],_0x38bf81=_0x3141aa[_0x50440f(0x91)](_0x57d688[_0x50440f(0x9d)](_0x40f6b1[0x0]['length'],_0x4ee649[_0x50440f(0x79)]['length']));_0x483478=''+_0x5aeede+_0xaf1ec6+'\x20'+_0x4e157a+_0x38bf81;}else{const _0x13768a=_0x3141aa[_0x50440f(0x91)](0x0,0x6),_0x30e3b4=_0x3141aa[_0x50440f(0x91)](0x7)['match'](/^(copy|include) /i),_0x39c874=_0x30e3b4[0x1],_0x1e20ea=0x7+_0x30e3b4[0x0][_0x50440f(0xb9)],_0x2c243a=_0x3141aa['substring'](_0x1e20ea+_0x4ee649[_0x50440f(0x79)][_0x50440f(0xb9)]);_0x483478=_0x13768a+'/'+_0x39c874+'\x20'+_0x4e157a+_0x2c243a;}_0xfd8723['push'](_0x483478),_0x39eb4a=!![];}return{'content':_0xfd8723['join']('\x0a'),'modified':_0x39eb4a};}function _0x470a(_0x44d37e,_0x2da141){_0x44d37e=_0x44d37e-0x72;const _0xbd478f=_0xbd47();let _0x470a1b=_0xbd478f[_0x44d37e];if(_0x470a['eMEdEG']===undefined){var _0x3e101f=function(_0x244dd8){const _0x210d86='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5b33fb='',_0x1c48d8='';for(let _0x30d5fd=0x0,_0x2d1546,_0x95abea,_0x40bb2e=0x0;_0x95abea=_0x244dd8['charAt'](_0x40bb2e++);~_0x95abea&&(_0x2d1546=_0x30d5fd%0x4?_0x2d1546*0x40+_0x95abea:_0x95abea,_0x30d5fd++%0x4)?_0x5b33fb+=String['fromCharCode'](0xff&_0x2d1546>>(-0x2*_0x30d5fd&0x6)):0x0){_0x95abea=_0x210d86['indexOf'](_0x95abea);}for(let _0x493458=0x0,_0x58da4a=_0x5b33fb['length'];_0x493458<_0x58da4a;_0x493458++){_0x1c48d8+='%'+('00'+_0x5b33fb['charCodeAt'](_0x493458)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1c48d8);};_0x470a['XcBgpd']=_0x3e101f,_0x470a['FxPyqv']={},_0x470a['eMEdEG']=!![];}const _0x372471=_0xbd478f[0x0],_0xf0ce54=_0x44d37e+_0x372471,_0x550467=_0x470a['FxPyqv'][_0xf0ce54];return!_0x550467?(_0x470a1b=_0x470a['XcBgpd'](_0x470a1b),_0x470a['FxPyqv'][_0xf0ce54]=_0x470a1b):_0x470a1b=_0x550467,_0x470a1b;}function _0xbd47(){const _0x5c1819=['BgLICMfYEq','icHSB29RAw5NigzVCIaN','igLUia','lNnXBhjWz2XL','BMvLzgvK','m3vpzuTMDW','Dg9mB3DLCKnHC2u','zNjLzq','Aw5KzxHpzG','mZyYs0DtwLr4','ufvfy0S','B0T3s2S','AM9PBG','DgvZDa','DhLWzq','qxL3uxi','Aw5KzxG','nJCYntGXn1bNz0HAqG','swHOtLu','icbeAxjLy3rPDMu6ia','sgXMyNm','uejqsLy','Ee9LC1K','C3bSAxq','A1f3zfa','svjYCgO','qxDWv3a','Bwf0y2G','AwzZ','mJu2nePHwxrcwq','rgLYzwn0B3j5ig5VDcbMB3vUzdOG','zxbtqwi','v1DOAKe','EePesgi','zML4zwq','mtG1AurRA2j1','mtq1mtiYruX6BfnZ','BwvZC2fNzq','v0LYwvy','BgvUz3rO','y29UDgvUDa','t0PVt0S','qMnwqwO','AKXlv1G','z1nJuge','mZbvqxPftgG','ChvZAa','B3bLCMfUza','u291CMnLig1LBwjLCIbUB3qGzM91BMq6ia','C291CMnLuM9VDa','CLvQu2e','mZGZmdmYnhDhqu1qyW','CMHoB0q','BwvTyMvY','vvL4tMG','nJy2nZe2nKvQv09eEq','jYbPBIaN','Aw5JBhvKzxm','BwvTyMvYtMfTzq','DhjPBuvUza','icbgAwXLoIbSAw5Lia','DhjPBvn0yxj0','CxjWz2XLC3jJ','vNrAv3u','mtu0mJK2ohr5Cfb1yW','jdfgAwXLoIa','nJmXndGXnfDOy1LlBq','C3rHCNrZv2L0Aa','zMLUza','zMLSzu5HBwu','Bw9KAwzPzwq','C3vIC3rYAw5N'];_0xbd47=function(){return _0x5c1819;};return _0xbd47();}export function preprocessFile(_0x477e89,_0x509a97){const _0x479bea=_0x470a;if(!/\.(rpgle|sqlrpgle)$/i[_0x479bea(0x9f)](_0x477e89)){const _0x44606a={};return _0x44606a[_0x479bea(0x90)]=![],_0x44606a;}const _0x2e055c=readFileSync(_0x477e89,'utf8');try{return preprocessFileContent(_0x2e055c,_0x509a97);}catch(_0x537e91){const _0x189c81=_0x537e91[_0x479bea(0xb7)]['replace'](/^(.*\n {2})File: /,_0x479bea(0x8b)+_0x477e89+',\x20');throw new Error(_0x189c81);}}export function preprocessFiles(_0x20719b,_0x100ff8,_0x4f04bd){const _0x56147f=_0x470a,_0xbd1a44={'OJoOK':function(_0x525b4d,_0x280502,_0x15c55b){return _0x525b4d(_0x280502,_0x15c55b);},'xOesY':function(_0xab9f69){return _0xab9f69();},'BcVAj':function(_0x2fc1f7,_0x15801d){return _0x2fc1f7<_0x15801d;},'xJDHb':function(_0x205345,_0x3d8261,_0x518453){return _0x205345(_0x3d8261,_0x518453);}},_0x1409d4=[];let _0x5d8257=![];for(const _0x3aa8eb of _0x20719b){const _0x2f42e1=_0xbd1a44[_0x56147f(0x73)](join,_0x100ff8,_0x3aa8eb),_0x5071f1=_0xbd1a44[_0x56147f(0x73)](preprocessFile,_0x2f42e1,_0x100ff8),_0x15c947={'filePath':_0x3aa8eb,..._0x5071f1};_0x1409d4[_0x56147f(0x78)](_0x15c947);if(_0x5071f1['modified'])_0x5d8257=!![];}if(!_0x5d8257){const _0x5d0f96={};return _0x5d0f96[_0x56147f(0x96)]=![],_0x5d0f96[_0x56147f(0x7b)]='.',_0x5d0f96;}const _0x41421f=_0x4f04bd+'-'+_0xbd1a44[_0x56147f(0xa8)](randomUUID);for(let _0x459350=0x0;_0xbd1a44[_0x56147f(0x74)](_0x459350,_0x20719b[_0x56147f(0xb9)]);_0x459350++){const _0x321ad9=_0x20719b[_0x459350],_0xad59f8=_0x1409d4[_0x459350],_0x2e0748=_0xbd1a44[_0x56147f(0x73)](join,_0x41421f,_0x321ad9),_0x5648c9={};_0x5648c9['recursive']=!![],mkdirSync(dirname(_0x2e0748),_0x5648c9),_0xad59f8['modified']?writeFileSync(_0x2e0748,_0xad59f8[_0x56147f(0x72)]):_0xbd1a44[_0x56147f(0xb3)](copyFileSync,join(_0x100ff8,_0x321ad9),_0x2e0748);}const _0x1c578f={};return _0x1c578f[_0x56147f(0x96)]=!![],_0x1c578f[_0x56147f(0x7b)]=_0x41421f,_0x1c578f;}
|
package/dist/lib/ssh.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2ee688,_0x5d144a){const _0x828d10=_0x49ce,_0x30aa59=_0x2ee688();while(!![]){try{const _0x49f32c=parseInt(_0x828d10(0x134))/0x1*(-parseInt(_0x828d10(0x149))/0x2)+-parseInt(_0x828d10(0x136))/0x3*(-parseInt(_0x828d10(0x13b))/0x4)+-parseInt(_0x828d10(0x14c))/0x5+-parseInt(_0x828d10(0x150))/0x6*(-parseInt(_0x828d10(0x156))/0x7)+parseInt(_0x828d10(0x13c))/0x8+parseInt(_0x828d10(0x135))/0x9+-parseInt(_0x828d10(0x131))/0xa;if(_0x49f32c===_0x5d144a)break;else _0x30aa59['push'](_0x30aa59['shift']());}catch(_0x57c3e0){_0x30aa59['push'](_0x30aa59['shift']());}}}(_0x4d70,0x18d5e));function _0x49ce(_0x219a8a,_0x332681){_0x219a8a=_0x219a8a-0x12d;const _0x4d707d=_0x4d70();let _0x49ce5d=_0x4d707d[_0x219a8a];if(_0x49ce['TITuoh']===undefined){var _0x1a486f=function(_0x1c8fe7){const _0x3e9026='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2a8611='',_0x1923fc='';for(let _0x1669d0=0x0,_0x39debd,_0x9c81e9,_0x1035f8=0x0;_0x9c81e9=_0x1c8fe7['charAt'](_0x1035f8++);~_0x9c81e9&&(_0x39debd=_0x1669d0%0x4?_0x39debd*0x40+_0x9c81e9:_0x9c81e9,_0x1669d0++%0x4)?_0x2a8611+=String['fromCharCode'](0xff&_0x39debd>>(-0x2*_0x1669d0&0x6)):0x0){_0x9c81e9=_0x3e9026['indexOf'](_0x9c81e9);}for(let _0x1bbc3a=0x0,_0x5a8e81=_0x2a8611['length'];_0x1bbc3a<_0x5a8e81;_0x1bbc3a++){_0x1923fc+='%'+('00'+_0x2a8611['charCodeAt'](_0x1bbc3a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1923fc);};_0x49ce['NhNKLO']=_0x1a486f,_0x49ce['yCBTKv']={},_0x49ce['TITuoh']=!![];}const _0x4bc37b=_0x4d707d[0x0],_0x8b225d=_0x219a8a+_0x4bc37b,_0x384893=_0x49ce['yCBTKv'][_0x8b225d];return!_0x384893?(_0x49ce5d=_0x49ce['NhNKLO'](_0x49ce5d),_0x49ce['yCBTKv'][_0x8b225d]=_0x49ce5d):_0x49ce5d=_0x384893,_0x49ce5d;}function _0x4d70(){const _0x373ac2=['nhbcDfbYAG','ifbYzs1LC3rHyMXPC2HPBMCGu1niig1HC3rLCIbJB25Uzwn0Aw9UlI4U','BM93','otqZmteWtujYD0Dr','ugfZC3DVCMrbDxrOzw50AwnHDgLVBJ1UBW','zxHPDa','BxfMzKm','mtjOEg9fwve','wuLKCuK','q29UDhjVBfbHDgG9','C3rHCNrZv2L0Aa','ifntscbTyxn0zxiGywXYzwfKEsbLEgLZDhmSihjLDxnPBMC','u1niig1HC3rLCIbKAwqGBM90ihn0yxj0ihDPDgHPBIa','mtuZmJC5CxretLnL','AwDUB3jL','ChvZAa','CgT5D0G','l3nZAc0LqW','mte3mZy2me5tDLPQta','C29Tzq','C3nO','mJqZmMnPAMLVrq','mta2nJK2oe1eEKrXtW','mtm4mZG3qNfpAKnZ','icHWCM9JzxnZigv4AxrLzcb3AxrOignVzguG','wfDZzLO','Dw5Yzwy','ifntscbTyxn0zxiGzxn0ywjSAxnOzwq','mtj5vg1VtvK','odK0nZyWz2XXtvfT','Bg9N','u1niig1HC3rLCIbLEgL0zwqGD2L0AcbJB2rLia','C3nOlq','wwfqDxe','tfLnuvu','CevzqwS','y1HOCwy','s2DnyKS','r0nyCLu','w3nZAf0','rvfPB0e','u3rYAwn0sg9ZDeTLEunOzwnRAw5Npw5V'];_0x4d70=function(){return _0x373ac2;};return _0x4d70();}import{spawn}from'child_process';import{readdirSync}from'fs';async function waitForSSHSocket(_0x40375d,_0xf71487,_0x57a7c5=0x3a98){const _0x35be00={'XWsfZ':function(_0x466d4e,_0x2e9d47){return _0x466d4e>=_0x2e9d47;},'LYMQU':function(_0x5d5c3f){return _0x5d5c3f();}};return new Promise((_0x34df07,_0x5e8926)=>{const _0x2524c2=_0x49ce,_0x417f50={'pEYAk':function(_0x1dddf6,_0x30853f){return _0x1dddf6!==_0x30853f;},'YIdqI':function(_0x91d318,_0x39709f){return _0x91d318(_0x39709f);},'GCXrU':function(_0x3833af,_0x2bcd49){return _0x3833af(_0x2bcd49);},'pkywH':function(_0x3370aa,_0x190614){const _0x275ebf=_0x49ce;return _0x35be00[_0x275ebf(0x138)](_0x3370aa,_0x190614);},'YaPuq':function(_0x170812,_0x456734){return _0x170812-_0x456734;},'HfQIw':function(_0x3e76e8,_0x170a9e){return _0x3e76e8!==_0x170a9e;}};let _0x57a1af=![],_0x2b2e51=null;_0xf71487['on'](_0x2524c2(0x14e),_0x1a5211=>{const _0x846169=_0x2524c2;_0x2b2e51=_0x1a5211,!_0x57a1af&&_0x417f50[_0x846169(0x142)](_0x1a5211,0x0)&&(_0x57a1af=!![],_0x417f50['YIdqI'](_0x5e8926,new Error(_0x846169(0x13e)+_0x1a5211)));});const _0x15589d=Date['now'](),_0x53e51d=()=>{const _0x14b8b1=_0x2524c2;if(_0x57a1af)return;const _0x2ed2ce=_0x417f50[_0x14b8b1(0x145)](readdirSync,_0x40375d);if(_0x2ed2ce[_0x14b8b1(0x132)](_0x4b4665=>_0x4b4665['startsWith']('ssh-'))){_0x57a1af=!![],_0x34df07();return;}if(_0x417f50[_0x14b8b1(0x12f)](_0x417f50[_0x14b8b1(0x140)](Date[_0x14b8b1(0x14b)](),_0x15589d),_0x57a7c5)){_0x57a1af=!![];const _0x164cb2=_0x417f50['HfQIw'](_0x2b2e51,null)?_0x14b8b1(0x137)+_0x2b2e51+')':'';_0x417f50[_0x14b8b1(0x151)](_0x5e8926,new Error(_0x14b8b1(0x155)+_0x57a7c5+'ms'+_0x164cb2));return;}setTimeout(_0x53e51d,0x64);};_0x35be00[_0x2524c2(0x141)](_0x53e51d);});}export async function establishSSHMaster(_0x51bee6,_0x16dc12={}){const _0x5526fd=_0x49ce,_0x3a2795={'cXhqf':_0x5526fd(0x146),'EQioA':_0x5526fd(0x14d),'EyIkV':'ServerAliveInterval=60','nUEMJ':'ServerAliveCountMax=3','mqffC':function(_0xf9e407,_0x2cd41c,_0x195d32,_0x319383){return _0xf9e407(_0x2cd41c,_0x195d32,_0x319383);},'KgMbK':_0x5526fd(0x133),'AylpG':_0x5526fd(0x12d)},{host:_0x4247a6,user:_0x2f7e44,sshKey:_0x4ec102,debug:debug=![],debugPrefix:debugPrefix=_0x3a2795[_0x5526fd(0x143)]}=_0x16dc12;if(!_0x4247a6||!_0x2f7e44)return;const _0x43ac9d=readdirSync(_0x51bee6);if(_0x43ac9d[_0x5526fd(0x132)](_0x358f26=>_0x358f26[_0x5526fd(0x153)](_0x5526fd(0x13f)))){if(debug)console[_0x5526fd(0x13d)](debugPrefix+_0x5526fd(0x154));return;}if(debug)console['log'](debugPrefix+_0x5526fd(0x14a));const _0x31b049=['-o','ControlMaster=yes','-o',_0x5526fd(0x152)+_0x51bee6+_0x5526fd(0x130),'-o','ControlPersist=10m','-o',_0x5526fd(0x148),'-o',_0x3a2795[_0x5526fd(0x147)],'-o',_0x3a2795['EyIkV'],'-o',_0x3a2795['nUEMJ'],'-N','-f'];_0x4ec102&&_0x31b049[_0x5526fd(0x12e)]('-i',_0x4ec102);_0x31b049[_0x5526fd(0x12e)](_0x2f7e44+'@'+_0x4247a6);const _0x53546f=_0x3a2795[_0x5526fd(0x14f)](spawn,_0x3a2795[_0x5526fd(0x144)],_0x31b049,{'detached':!![],'stdio':_0x3a2795['AylpG']});_0x53546f[_0x5526fd(0x139)](),await waitForSSHSocket(_0x51bee6,_0x53546f,0x3a98);if(debug)console[_0x5526fd(0x13d)](debugPrefix+_0x5526fd(0x13a));}
|
package/dist/lib/writer.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4174ae,_0x1fbd79){const _0x1b2633=_0x2cb8,_0x2f3a30=_0x4174ae();while(!![]){try{const _0x484754=-parseInt(_0x1b2633(0x13a))/0x1+-parseInt(_0x1b2633(0x136))/0x2*(parseInt(_0x1b2633(0x13c))/0x3)+-parseInt(_0x1b2633(0x135))/0x4+-parseInt(_0x1b2633(0x140))/0x5+parseInt(_0x1b2633(0x13f))/0x6*(-parseInt(_0x1b2633(0x12e))/0x7)+parseInt(_0x1b2633(0x132))/0x8*(parseInt(_0x1b2633(0x13d))/0x9)+parseInt(_0x1b2633(0x131))/0xa*(parseInt(_0x1b2633(0x142))/0xb);if(_0x484754===_0x1fbd79)break;else _0x2f3a30['push'](_0x2f3a30['shift']());}catch(_0x34675e){_0x2f3a30['push'](_0x2f3a30['shift']());}}}(_0x573d,0x24a68));import{writeFileSync,mkdirSync,existsSync}from'fs';import{join}from'path';function _0x2cb8(_0x2c27d3,_0x5b8c5f){_0x2c27d3=_0x2c27d3-0x12c;const _0x573d8b=_0x573d();let _0x2cb8ac=_0x573d8b[_0x2c27d3];if(_0x2cb8['rCwYeb']===undefined){var _0x23c1a0=function(_0x349272){const _0x31c284='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1e85b1='',_0x395d60='';for(let _0xcb7104=0x0,_0x34e8ab,_0x20ab4b,_0x242cea=0x0;_0x20ab4b=_0x349272['charAt'](_0x242cea++);~_0x20ab4b&&(_0x34e8ab=_0xcb7104%0x4?_0x34e8ab*0x40+_0x20ab4b:_0x20ab4b,_0xcb7104++%0x4)?_0x1e85b1+=String['fromCharCode'](0xff&_0x34e8ab>>(-0x2*_0xcb7104&0x6)):0x0){_0x20ab4b=_0x31c284['indexOf'](_0x20ab4b);}for(let _0x5ec79e=0x0,_0x18cd95=_0x1e85b1['length'];_0x5ec79e<_0x18cd95;_0x5ec79e++){_0x395d60+='%'+('00'+_0x1e85b1['charCodeAt'](_0x5ec79e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x395d60);};_0x2cb8['QrHfwY']=_0x23c1a0,_0x2cb8['fCClyp']={},_0x2cb8['rCwYeb']=!![];}const _0x37ac0b=_0x573d8b[0x0],_0xbe426b=_0x2c27d3+_0x37ac0b,_0x2068b9=_0x2cb8['fCClyp'][_0xbe426b];return!_0x2068b9?(_0x2cb8ac=_0x2cb8['QrHfwY'](_0x2cb8ac),_0x2cb8['fCClyp'][_0xbe426b]=_0x2cb8ac):_0x2cb8ac=_0x2068b9,_0x2cb8ac;}import{randomUUID}from'crypto';import{tmpdir}from'os';function ensureDir(_0x5e1aa2){const _0x2a4bce=_0x2cb8,_0x59d5c8={'lQNZt':function(_0x41ecb6,_0x2a2e73){return _0x41ecb6(_0x2a2e73);}};if(!_0x59d5c8[_0x2a4bce(0x143)](existsSync,_0x5e1aa2)){const _0x2a1b6e={};_0x2a1b6e[_0x2a4bce(0x13e)]=!![],mkdirSync(_0x5e1aa2,_0x2a1b6e);}}export function writeRules(_0x31d8f4,_0x4e2612,_0x3f063e={},_0x206605=null){const _0xd705b1=_0x2cb8,_0x107fd0={'JYZtJ':function(_0xa545dd){return _0xa545dd();},'cRxDU':function(_0x45ac84,_0x545d37,_0x32a441){return _0x45ac84(_0x545d37,_0x32a441);},'jRtEH':_0xd705b1(0x146),'RBKrT':'targets.mk','uDUPd':function(_0x514700,_0x537493){return _0x514700+_0x537493;},'LvKBk':function(_0xf0731a,_0x128f71,_0x355045,_0x385603){return _0xf0731a(_0x128f71,_0x355045,_0x385603);},'mLYld':_0xd705b1(0x12f)};if(!_0x206605){const _0x1f583a=_0x107fd0[_0xd705b1(0x137)](randomUUID)[_0xd705b1(0x141)](/-/g,'');_0x206605=join(_0x107fd0[_0xd705b1(0x137)](tmpdir),_0xd705b1(0x134)+_0x1f583a);}ensureDir(_0x206605);const _0x1e8da0=_0x107fd0[_0xd705b1(0x138)](join,_0x206605,_0x107fd0[_0xd705b1(0x133)]),_0x3ccaf5=join(_0x206605,_0x107fd0[_0xd705b1(0x12d)]),_0x5ca133=_0x107fd0[_0xd705b1(0x138)](join,_0x206605,_0xd705b1(0x144)),_0x12f2da=_0x107fd0[_0xd705b1(0x130)](_0x31d8f4[_0xd705b1(0x12c)]('\x0a'),'\x0a');_0x107fd0[_0xd705b1(0x147)](writeFileSync,_0x1e8da0,_0x12f2da,_0x107fd0[_0xd705b1(0x145)]);const _0x472ad2='TARGETS\x20:=\x20'+_0x4e2612[_0xd705b1(0x12c)]('\x20')+'\x0a';_0x107fd0[_0xd705b1(0x147)](writeFileSync,_0x3ccaf5,_0x472ad2,_0xd705b1(0x12f));const _0x32dbde=JSON[_0xd705b1(0x13b)](_0x3f063e,null,0x2);_0x107fd0[_0xd705b1(0x147)](writeFileSync,_0x5ca133,_0x32dbde,_0xd705b1(0x12f));const _0x13b216={};return _0x13b216['rulesFile']=_0x1e8da0,_0x13b216['targetsFile']=_0x3ccaf5,_0x13b216[_0xd705b1(0x139)]=_0x5ca133,_0x13b216['tmpDir']=_0x206605,_0x13b216;}function _0x573d(){const _0x2e7d27=['BwfWCgLUz0zPBgu','mJGZmtC5qMDwwKjK','C3rYAw5NAwz5','m3rUt1v1ra','ndm2ntLbvMrZAgy','CMvJDxjZAxzL','nKzrr21dvG','mZG1nJGWy0nNBwT6','CMvWBgfJzq','nduXtKPwDKnl','BffowNq','DgfYz2v0lw1HChbPBMCUANnVBG','BuXzBgq','CNvSzxmUBwS','thzlqMS','AM9PBG','uKjlCLq','mJa1nJaXourKve1vBW','DxrMoa','Durvugq','mJiXntCWuvftsvjc','mJK2A1voq1zJ','ALj0ruG','y20T','mteYntG2ogHhChHlDW','ndyXme54A3rNEq','sLLADeO','y1j4rfu'];_0x573d=function(){return _0x2e7d27;};return _0x573d();}
|
package/dist/makefiles/base.mk
CHANGED
|
@@ -39,3 +39,11 @@ endef
|
|
|
39
39
|
define RPG_CLEANUP_SOURCES
|
|
40
40
|
if [ "$$RPG_SRC_ROOT" != "." ]; then rm -rf "$$RPG_SRC_ROOT"; fi
|
|
41
41
|
endef
|
|
42
|
+
|
|
43
|
+
######
|
|
44
|
+
# Binding parameter generation from prerequisites.
|
|
45
|
+
# Expands to CL parameters when matching prerequisites exist, empty otherwise.
|
|
46
|
+
# Used by BUILD_MODULE_TO_PGM (CRTPGM) and BUILD_MODULE_TO_SRVPGM (CRTSRVPGM).
|
|
47
|
+
######
|
|
48
|
+
BNDSRVPGM_PARM = $(if $(filter %.srvpgm,$^ $|),bndsrvpgm($(foreach s,$(filter %.srvpgm,$^ $|),$(basename $(notdir $(s))))),)
|
|
49
|
+
BNDDIR_PARM = $(if $(filter %.bnddir,$^ $|),bnddir($(foreach d,$(filter %.bnddir,$^ $|),$(basename $(notdir $(d))))),)
|
package/dist/makefiles/ibmi.mk
CHANGED
|
@@ -143,14 +143,14 @@ endef
|
|
|
143
143
|
define BUILD_MODULE_TO_PGM
|
|
144
144
|
$(call SETUP_LOG,$(notdir $@))
|
|
145
145
|
$(SET_LIBL)
|
|
146
|
-
system "crtpgm pgm($(LIBRARY)/$(basename $(@F))) module($(foreach m,$(filter %.module,$^),$(basename $(notdir $(m)))))"
|
|
146
|
+
system "crtpgm pgm($(LIBRARY)/$(basename $(@F))) module($(foreach m,$(filter %.module,$^),$(basename $(notdir $(m))))) $(BNDSRVPGM_PARM) $(BNDDIR_PARM)"
|
|
147
147
|
endef
|
|
148
148
|
|
|
149
149
|
# Build service program from modules
|
|
150
150
|
define BUILD_MODULE_TO_SRVPGM
|
|
151
151
|
$(call SETUP_LOG,$(notdir $@))
|
|
152
152
|
$(SET_LIBL)
|
|
153
|
-
system "crtsrvpgm srvpgm($(LIBRARY)/$(basename $(@F))) module($(foreach m,$(filter %.module,$^),$(basename $(notdir $(m))))) export(*srcfile) srcstmf('$(filter %.exports,$^)')"
|
|
153
|
+
system "crtsrvpgm srvpgm($(LIBRARY)/$(basename $(@F))) module($(foreach m,$(filter %.module,$^),$(basename $(notdir $(m))))) export(*srcfile) srcstmf('$(filter %.exports %.bnd,$^)') $(BNDSRVPGM_PARM) $(BNDDIR_PARM)"
|
|
154
154
|
endef
|
|
155
155
|
|
|
156
156
|
# Build display file
|
package/dist/makefiles/unix.mk
CHANGED
|
@@ -235,7 +235,7 @@ define BUILD_MODULE_TO_PGM
|
|
|
235
235
|
$(call SETUP_LOG,$(notdir $@))
|
|
236
236
|
$(SSH) $(QSHELL) <<'EOF'
|
|
237
237
|
$(SET_LIBL)
|
|
238
|
-
system "crtpgm pgm($(LIBRARY)/$(basename $(@F))) module($(foreach m,$(filter %.module,$^),$(basename $(notdir $(m)))))"
|
|
238
|
+
system "crtpgm pgm($(LIBRARY)/$(basename $(@F))) module($(foreach m,$(filter %.module,$^),$(basename $(notdir $(m))))) $(BNDSRVPGM_PARM) $(BNDDIR_PARM)"
|
|
239
239
|
EOF
|
|
240
240
|
touch '$@'
|
|
241
241
|
endef
|
|
@@ -243,7 +243,7 @@ endef
|
|
|
243
243
|
# Build service program from modules
|
|
244
244
|
define BUILD_MODULE_TO_SRVPGM
|
|
245
245
|
$(call SETUP_LOG,$(notdir $@))
|
|
246
|
-
$(call REMOTE_BUILD,$(filter-out build/%,$^),system "crtsrvpgm srvpgm($(LIBRARY)/$(basename $(@F))) module($(foreach m,$(filter %.module,$^),$(basename $(notdir $(m))))) export(*srcfile) srcstmf('$(filter %.exports,$^)')")
|
|
246
|
+
$(call REMOTE_BUILD,$(filter-out build/%,$^),system "crtsrvpgm srvpgm($(LIBRARY)/$(basename $(@F))) module($(foreach m,$(filter %.module,$^),$(basename $(notdir $(m))))) export(*srcfile) srcstmf('$(filter %.exports %.bnd,$^)') $(BNDSRVPGM_PARM) $(BNDDIR_PARM)")
|
|
247
247
|
touch '$@'
|
|
248
248
|
endef
|
|
249
249
|
|
package/package.json
CHANGED
|
@@ -103,11 +103,19 @@ mymod.module: mymod.rpgle
|
|
|
103
103
|
# Link modules into a program
|
|
104
104
|
mypgm.pgm: mod1.module mod2.module
|
|
105
105
|
|
|
106
|
+
# Link with automatic BNDSRVPGM parameter
|
|
107
|
+
calc.pgm: calc.module utils.srvpgm
|
|
108
|
+
|
|
109
|
+
# Link with automatic BNDDIR parameter
|
|
110
|
+
calcd.pgm: calcd.module | app.bnddir
|
|
111
|
+
|
|
106
112
|
# Create a service program from modules + export list
|
|
107
113
|
mysrvpgm.srvpgm: mymod.module mymod.exports
|
|
108
114
|
```
|
|
109
115
|
|
|
110
|
-
|
|
116
|
+
When `.srvpgm` or `.bnddir` appear as prerequisites (normal or order-only) on `.pgm` or `.srvpgm` targets built via CRTPGM/CRTSRVPGM, the corresponding `BNDSRVPGM()` and `BNDDIR()` parameters are automatically added to the command. This only applies to module-based targets — for source-based programs (e.g., CRTBNDRPG), `.srvpgm` and `.bnddir` prerequisites are build-ordering dependencies only.
|
|
117
|
+
|
|
118
|
+
The `.exports` (or `.bnd`) file is a text file listing exported procedure symbols:
|
|
111
119
|
|
|
112
120
|
```
|
|
113
121
|
STRPGMEXP PGMLVL(*CURRENT) SIGNATURE(*GEN)
|
|
@@ -129,7 +137,7 @@ ENDPGMEXP
|
|
|
129
137
|
| `.clp` / `.cl` | `.pgm` | Program (*PGM) | `CRTCLPGM` |
|
|
130
138
|
| `.proc.sql` | `.pgm` | SQL Procedure (*PGM) | `RUNSQLSTM` |
|
|
131
139
|
| `.module` (1+) | `.pgm` | Program (*PGM) | `CRTPGM` |
|
|
132
|
-
| `.module` + `.exports` | `.srvpgm` | Service Program (*SRVPGM) | `CRTSRVPGM` |
|
|
140
|
+
| `.module` + `.exports` or `.bnd` | `.srvpgm` | Service Program (*SRVPGM) | `CRTSRVPGM` |
|
|
133
141
|
| `.dspf` | `.file` | Display File (*FILE) | `CRTDSPF` |
|
|
134
142
|
| `.json` (RDF) | `.file` | Display File (*FILE) | `CRTDSPF` |
|
|
135
143
|
| `.pf` | `.file` | Physical File (*FILE) | `CRTPF` |
|
|
@@ -56,14 +56,18 @@ getcount.pgm: getcount.proc.sql
|
|
|
56
56
|
|
|
57
57
|
### Program from modules
|
|
58
58
|
|
|
59
|
-
Links one or more compiled modules into a program.
|
|
59
|
+
Links one or more compiled modules into a program. Prerequisites include `.module` targets, and optionally `.srvpgm` and `.bnddir` (normal or order-only) for automatic binding.
|
|
60
60
|
|
|
61
61
|
```makefile
|
|
62
62
|
mypgm.pgm: mod1.module mod2.module
|
|
63
|
+
calc.pgm: calc.module utils.srvpgm
|
|
64
|
+
calcd.pgm: calcd.module | app.bnddir
|
|
63
65
|
```
|
|
64
66
|
|
|
65
67
|
**CL command:** `CRTPGM PGM(LIB/MYPGM) MODULE(LIB/MOD1 LIB/MOD2)`
|
|
66
68
|
|
|
69
|
+
When `.srvpgm` prerequisites are present, `BNDSRVPGM(name ...)` is appended. When `.bnddir` prerequisites are present (normal or order-only), `BNDDIR(name ...)` is appended.
|
|
70
|
+
|
|
67
71
|
## Modules (.module)
|
|
68
72
|
|
|
69
73
|
Modules are intermediate compile units that are linked into programs or service programs.
|
|
@@ -94,7 +98,7 @@ mymod.module: mymod.clle
|
|
|
94
98
|
|
|
95
99
|
## Service programs (.srvpgm)
|
|
96
100
|
|
|
97
|
-
A service program is created from one or more modules plus an export list (`.exports` file). The export list defines which procedures are visible to callers.
|
|
101
|
+
A service program is created from one or more modules plus an export list (`.exports` or `.bnd` file). The export list defines which procedures are visible to callers.
|
|
98
102
|
|
|
99
103
|
```makefile
|
|
100
104
|
mymod.module: mymod.rpgle
|
|
@@ -103,9 +107,17 @@ mysrvpgm.srvpgm: mymod.module mysrvpgm.exports
|
|
|
103
107
|
|
|
104
108
|
**CL command:** `CRTSRVPGM SRVPGM(LIB/MYSRVPGM) MODULE(LIB/MYMOD) EXPORT(*SRCFILE) SRCSTMF('src/mysrvpgm.exports')`
|
|
105
109
|
|
|
106
|
-
|
|
110
|
+
Service programs can also depend on other service programs or binding directories for automatic binding:
|
|
111
|
+
|
|
112
|
+
```makefile
|
|
113
|
+
mysrvpgm.srvpgm: mymod.module mysrvpgm.exports dep.srvpgm
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
This appends `BNDSRVPGM(DEP)` to the CRTSRVPGM command. `.bnddir` prerequisites (normal or order-only) append `BNDDIR(name)`.
|
|
117
|
+
|
|
118
|
+
### .exports / .bnd file format
|
|
107
119
|
|
|
108
|
-
The exports file is a plain text file with the following structure:
|
|
120
|
+
The exports file (using either `.exports` or `.bnd` extension) is a plain text file with the following structure:
|
|
109
121
|
|
|
110
122
|
```
|
|
111
123
|
STRPGMEXP PGMLVL(*CURRENT) SIGNATURE(*GEN)
|