termill 0.2.1 → 0.2.2
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/CHANGELOG.md +2 -2
- package/README.md +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
# v0.2.
|
|
1
|
+
# v0.2.2 — README Link Fix
|
|
2
2
|
|
|
3
3
|
Released: 2026-03-21
|
|
4
4
|
|
|
5
|
-
- `AUTHORING.md`
|
|
5
|
+
- `AUTHORING.md` link in README now points to unpkg so it resolves on npmjs.com
|
package/README.md
CHANGED
|
@@ -54,7 +54,7 @@ Press `CTRL+C` at any time to quit.
|
|
|
54
54
|
|
|
55
55
|
## For Game Authors
|
|
56
56
|
|
|
57
|
-
Want to publish a terminal game to the termill ecosystem? Use `termill init` to scaffold a compliant project in seconds, `termill validate .` to check it before publishing, then `npm publish` to make it discoverable. Full spec and getting-started guide in [AUTHORING.md](AUTHORING.md).
|
|
57
|
+
Want to publish a terminal game to the termill ecosystem? Use `termill init` to scaffold a compliant project in seconds, `termill validate .` to check it before publishing, then `npm publish` to make it discoverable. Full spec and getting-started guide in [AUTHORING.md](https://unpkg.com/termill/AUTHORING.md).
|
|
58
58
|
|
|
59
59
|
---
|
|
60
60
|
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const _0x41a03d=_0x7ba9;(function(_0x59813f,_0xdb33b8){const _0x233ffa=_0x7ba9,_0x4dc150=_0x59813f();while(!![]){try{const _0x2c57cd=-parseInt(_0x233ffa(0xf7))/0x1*(-parseInt(_0x233ffa(0xc4))/0x2)+-parseInt(_0x233ffa(0x16c))/0x3*(parseInt(_0x233ffa(0x168))/0x4)+parseInt(_0x233ffa(0xe3))/0x5+-parseInt(_0x233ffa(0xa9))/0x6+parseInt(_0x233ffa(0xd0))/0x7+parseInt(_0x233ffa(0x141))/0x8*(parseInt(_0x233ffa(0xaf))/0x9)+-parseInt(_0x233ffa(0x137))/0xa*(-parseInt(_0x233ffa(0xbb))/0xb);if(_0x2c57cd===_0xdb33b8)break;else _0x4dc150['push'](_0x4dc150['shift']());}catch(_0x373baf){_0x4dc150['push'](_0x4dc150['shift']());}}}(_0x259c,0xb1113));import{mkdirSync as _0x485479}from'node:fs';import{homedir as _0x555fc1}from'node:os';import{join as _0x34c088}from'node:path';var w=_0x34c088(_0x555fc1(),_0x41a03d(0x11c)),x=_0x34c088(w,_0x41a03d(0x124)),k=_0x34c088(w,_0x41a03d(0x145)),b=_0x34c088(w,_0x41a03d(0xe0)),O=[];import{generateKeyPairSync as _0x467e84,sign as _0x4f8e27,verify as _0x3b36d5,createPublicKey as _0x226138}from'node:crypto';import{readFileSync as _0x596c64,writeFileSync as _0x57be24,existsSync as _0x135792,mkdirSync as _0x2b1cf6}from'node:fs';import{join as _0x4523b3}from'node:path';var z=_0x4523b3(x,_0x41a03d(0xfc)),D=_0x4523b3(x,_0x41a03d(0x103));function Q(){const _0x1bdd88=_0x41a03d;_0x2b1cf6(x,{'recursive':!0x0});let {privateKey:_0x579eee,publicKey:_0x5a7dab}=_0x467e84(_0x1bdd88(0x155),{'privateKeyEncoding':{'type':_0x1bdd88(0x175),'format':_0x1bdd88(0xa5)},'publicKeyEncoding':{'type':_0x1bdd88(0x151),'format':_0x1bdd88(0x11b)}}),_0x2013ff=_0x5a7dab['slice'](-0x20)[_0x1bdd88(0xb9)]('hex');return _0x57be24(z,_0x579eee,{'encoding':_0x1bdd88(0x176),'mode':0x180}),_0x57be24(D,_0x2013ff,{'encoding':_0x1bdd88(0x176),'mode':0x1a4}),{'publicKey':_0x2013ff};}function X(){return _0x135792(z)&&_0x135792(D);}function Z(){const _0xdee8a8=_0x41a03d;return _0x596c64(D,_0xdee8a8(0x176))[_0xdee8a8(0x14b)]();}import{readFileSync as _0x23bde5,writeFileSync as _0x35785c,existsSync as _0x4b25ff,mkdirSync as _0x3f6b9d}from'node:fs';import{dirname as _0xe3ba0}from'node:path';function N(){const _0x7a2deb=_0x41a03d;if(!_0x4b25ff(k))return[];try{return JSON[_0x7a2deb(0xf3)](_0x23bde5(k,_0x7a2deb(0x176)));}catch{return[];}}function q(_0x1be6b9){const _0x1393fa=_0x41a03d;_0x3f6b9d(_0xe3ba0(k),{'recursive':!0x0}),_0x35785c(k,JSON[_0x1393fa(0x133)](_0x1be6b9,null,0x2),_0x1393fa(0x176));}function ee(_0x289de3){const _0x4124d4=_0x41a03d;let _0xc88730=N()['filter'](_0x4028f0=>_0x4028f0[_0x4124d4(0xb8)]!==_0x289de3[_0x4124d4(0xb8)]);_0xc88730['push'](_0x289de3),q(_0xc88730);}function te(_0x492d34){const _0x2e5127=_0x41a03d;return N()[_0x2e5127(0x11a)](_0x407f75=>_0x407f75['packageName']===_0x492d34)??null;}function ne(_0x4a42a5){const _0x56b002=_0x41a03d;let _0x56524d=N()[_0x56b002(0xb0)](_0x280487=>_0x280487[_0x56b002(0xb8)]!==_0x4a42a5);q(_0x56524d);}function re(){return N();}import{execSync as _0x38c4e2}from'node:child_process';import{readFileSync as _0x13963b}from'node:fs';import{join as _0x4dc2c4}from'node:path';function Te(_0x14f20a){const _0x2f94c7=_0x41a03d;let _0x166f62=_0x38c4e2('npm\x20root\x20-g',{'encoding':'utf8'})[_0x2f94c7(0x14b)](),_0x14b974=_0x4dc2c4(_0x166f62,_0x14f20a,_0x2f94c7(0xb1)),_0x469eba=JSON[_0x2f94c7(0xf3)](_0x13963b(_0x14b974,_0x2f94c7(0x176)));if(!_0x469eba[_0x2f94c7(0xad)])throw new Error(_0x2f94c7(0x12e)+_0x14f20a+_0x2f94c7(0x117));return _0x469eba[_0x2f94c7(0xad)];}function Re(_0x111a11){const _0x5857f0=_0x41a03d;try{let _0x11d8ad=JSON[_0x5857f0(0xf3)](_0x38c4e2(_0x5857f0(0x10c)+_0x111a11+_0x5857f0(0x16a),{'encoding':_0x5857f0(0x176)}));return typeof _0x11d8ad==_0x5857f0(0x15d)?_0x11d8ad:String(_0x11d8ad);}catch{return _0x5857f0(0x115);}}async function _(_0x2b2856){const _0x2a3328=_0x41a03d;let _0x20efe7=te(_0x2b2856);if(_0x20efe7){let _0x3e17d0=Re(_0x2b2856);if(_0x3e17d0!=='unknown'&&_0x3e17d0===_0x20efe7[_0x2a3328(0x157)])return{'alreadyCurrent':!0x0};}_0x38c4e2(_0x2a3328(0x147)+_0x2b2856,{'stdio':'inherit'});let _0xb91aee=Te(_0x2b2856),_0x15e51a=JSON[_0x2a3328(0xf3)](_0x38c4e2(_0x2a3328(0x158)+_0x2b2856,{'encoding':_0x2a3328(0x176)}))[_0x2a3328(0x15e)]?.[_0x2b2856]?.['version']??'unknown';return ee({'packageName':_0x2b2856,'title':_0xb91aee[_0x2a3328(0xb5)]??_0x2b2856,'description':_0xb91aee[_0x2a3328(0x14c)]??'','version':_0x15e51a,'launchCommand':_0xb91aee['launchCommand'],'installedAt':new Date()[_0x2a3328(0x11e)]()}),_0x20efe7?{'updated':!0x0}:{};}async function oe(_0x2cf160){const _0x1cddc4=_0x41a03d;_0x38c4e2(_0x1cddc4(0xea)+_0x2cf160,{'stdio':'inherit'}),ne(_0x2cf160);}import{spawn as _0x2bf447}from'node:child_process';function Ae(){const _0x741bce=_0x41a03d;let _0xc6c261=process[_0x741bce(0x179)];return _0xc6c261===_0x741bce(0xdc)||_0xc6c261===_0x741bce(0x165)?_0xc6c261:_0x741bce(0x12c);}function Le(_0x45b988,_0x3c0358){const _0x2bb8d0=_0x41a03d;switch(_0x3c0358){case'win32':return{'cmd':_0x2bb8d0(0xf8),'args':['/c',_0x2bb8d0(0xd2),_0x2bb8d0(0xf8),'/k',_0x45b988],'options':{'detached':!0x0,'shell':!0x1}};case'darwin':return{'cmd':_0x2bb8d0(0x160),'args':['-e',_0x2bb8d0(0xab)+_0x45b988+'\x22'],'options':{'detached':!0x0}};case _0x2bb8d0(0x12c):default:return{'cmd':process[_0x2bb8d0(0xb3)][_0x2bb8d0(0x113)]??'xterm','args':['-e',_0x45b988],'options':{'detached':!0x0}};}}function T(_0x41506d){const _0x1b5ad2=_0x41a03d;let {cmd:_0x3fb745,args:_0xa5ef3e,options:_0x19c91a}=Le(_0x41506d,Ae());_0x2bf447(_0x3fb745,_0xa5ef3e,{..._0x19c91a,'stdio':_0x1b5ad2(0x11f)})[_0x1b5ad2(0x126)]();}import{readFileSync as _0x28ad62,writeFileSync as _0x1e7a2d,existsSync as _0x5820e6,mkdirSync as _0x1b5e87}from'node:fs';import{dirname as _0x56c2f6}from'node:path';function Je(){const _0x3492d9=_0x41a03d;if(!_0x5820e6(b))return[...O];try{return JSON[_0x3492d9(0xf3)](_0x28ad62(b,_0x3492d9(0x176)));}catch{return[...O];}}function Ge(_0x52e00e){const _0x2a56eb=_0x41a03d;_0x1b5e87(_0x56c2f6(b),{'recursive':!0x0}),_0x1e7a2d(b,JSON['stringify'](_0x52e00e,null,0x2),_0x2a56eb(0x176));}async function He(_0x2e87a5){const _0x2a6e66=_0x41a03d;try{let _0x40cb56=await fetch(_0x2e87a5+_0x2a6e66(0x111),{'signal':AbortSignal[_0x2a6e66(0xb7)](0x1388)});return _0x40cb56['ok']?await _0x40cb56[_0x2a6e66(0x130)]():[];}catch{return[];}}async function Be(_0x1acdc1){const _0x257ee2=_0x41a03d;try{let _0xa2e0b4=await fetch(_0x1acdc1+_0x257ee2(0xd1),{'signal':AbortSignal[_0x257ee2(0xb7)](0x1388)});return _0xa2e0b4['ok']?await _0xa2e0b4[_0x257ee2(0x130)]():[];}catch{return[];}}async function se(){const _0x590651=_0x41a03d;let _0x3814a9=Je(),[_0x42284f,_0x481f3e]=await Promise[_0x590651(0xee)]([Promise[_0x590651(0xee)](_0x3814a9[_0x590651(0x138)](_0x6daeb4=>He(_0x6daeb4))),Promise[_0x590651(0xee)](_0x3814a9[_0x590651(0x138)](_0x267878=>Be(_0x267878)))]),_0x78f0ad=_0x42284f['flat'](),_0x12597d=_0x481f3e[_0x590651(0xf2)](),_0x4d9266=[...new Set([..._0x3814a9,..._0x12597d])];return Ge(_0x4d9266),{'games':_0x78f0ad,'peers':_0x4d9266};}var Ye=_0x41a03d(0xa6);function Fe(_0x43534c){const _0x4603bb=_0x41a03d;let _0xdd8858=_0x43534c[_0x4603bb(0xad)]??{};return{'packageName':_0x43534c[_0x4603bb(0xc0)],'title':_0xdd8858[_0x4603bb(0xb5)]??_0x43534c[_0x4603bb(0xc0)],'description':_0xdd8858[_0x4603bb(0x14c)]??_0x43534c['description']??'','version':_0x43534c[_0x4603bb(0x157)]??'unknown','keywords':_0x43534c['keywords']??[]};}function _0x7ba9(_0x24af0b,_0x208c12){_0x24af0b=_0x24af0b-0xa4;const _0x259c5a=_0x259c();let _0x7ba9ab=_0x259c5a[_0x24af0b];return _0x7ba9ab;}async function R(_0x268dd1=''){const _0x254856=_0x41a03d;let [_0xd26f8b,_0x2225bf]=await Promise[_0x254856(0xee)]([se()[_0x254856(0x13f)](()=>({'games':[]})),Ue(_0x268dd1)]),_0x7d65d1=_0xd26f8b['games']??[],_0x9f3c83=new Set(_0x7d65d1[_0x254856(0x138)](_0x52e6ad=>_0x52e6ad[_0x254856(0xb8)])),_0x213a28=_0x2225bf[_0x254856(0xb0)](_0x3d1e13=>!_0x9f3c83['has'](_0x3d1e13[_0x254856(0xb8)])),_0x56a7cf=_0x268dd1[_0x254856(0x14b)]()[_0x254856(0x154)](),_0x3829a4=_0x139bc9=>_0x56a7cf?_0x139bc9['packageName'][_0x254856(0x154)]()[_0x254856(0xb6)](_0x56a7cf)||(_0x139bc9[_0x254856(0xb5)]??'')[_0x254856(0x154)]()[_0x254856(0xb6)](_0x56a7cf)||(_0x139bc9['description']??'')[_0x254856(0x154)]()['includes'](_0x56a7cf):!0x0;return[..._0x7d65d1[_0x254856(0xb0)](_0x3829a4),..._0x213a28[_0x254856(0xb0)](_0x3829a4)];}async function Ue(_0x366229){const _0x18047f=_0x41a03d;try{let _0x3b6d7c=_0x366229?encodeURIComponent(_0x366229+_0x18047f(0xaa)):_0x18047f(0x146),_0x947ee9=Ye+_0x18047f(0xce)+_0x3b6d7c+_0x18047f(0x159),_0x1347cf=await fetch(_0x947ee9,{'signal':AbortSignal['timeout'](0x1f40)});return _0x1347cf['ok']?((await _0x1347cf[_0x18047f(0x130)]())[_0x18047f(0xff)]??[])[_0x18047f(0x138)](_0x2e4383=>Fe(_0x2e4383['package'])):[];}catch{return[];}}import{stdout as _0x58adf5}from'node:process';var j='\x1b',M=j+_0x41a03d(0x100),Ve=j+_0x41a03d(0x16d),ze=j+'[2m',Qe=j+_0x41a03d(0x104),ie=()=>_0x58adf5[_0x41a03d(0xeb)]??0x50;function m(_0x258d08){const _0x5c6f26=_0x41a03d;let _0x42815c=ie(),_0x5d0487='\x20'+_0x258d08+'\x20',_0x183c93=Math[_0x5c6f26(0x163)]((_0x42815c-_0x5d0487[_0x5c6f26(0x16b)])/0x2),_0x4f1fbe='─'[_0x5c6f26(0x148)](Math[_0x5c6f26(0xf9)](0x0,_0x183c93))+_0x5d0487+'─'['repeat'](Math[_0x5c6f26(0xf9)](0x0,_0x183c93));console['log'](Qe+_0x4f1fbe[_0x5c6f26(0x134)](0x0,_0x42815c)+M);}function K(_0x59152a,_0x21ebae){const _0x2c45bc=_0x41a03d;_0x59152a[_0x2c45bc(0x127)]((_0x14d1a5,_0x3fe131)=>{const _0x3fa4fa=_0x2c45bc;let _0x3a76f9=(_0x3fe131===_0x21ebae?'>\x20':'\x20\x20')+_0x14d1a5;console[_0x3fa4fa(0xda)](_0x3fe131===_0x21ebae?Ve+_0x3a76f9[_0x3fa4fa(0x139)](ie())+M:_0x3a76f9);});}function J(_0x57791b){const _0xfe8866=_0x41a03d;console[_0xfe8866(0xda)](ze+_0x57791b+M);}function h(_0x3b9a59){let _0x1e4313=['⠋','⠙','⠹','⠸','⠼','⠴','⠦','⠧','⠇','⠏'],_0x3162f6=0x0,_0x195aa4=null;return{'start'(){_0x195aa4=setInterval(()=>{const _0x34a3df=_0x7ba9;process[_0x34a3df(0xf4)][_0x34a3df(0xcd)]('\x0d'+_0x1e4313[_0x3162f6++%_0x1e4313['length']]+'\x20'+_0x3b9a59);},0x50);},'stop'(){const _0x5d1062=_0x7ba9;_0x195aa4&&(clearInterval(_0x195aa4),_0x195aa4=null,process['stdout'][_0x5d1062(0xcd)]('\x0d'+'\x20'[_0x5d1062(0x148)](_0x3b9a59[_0x5d1062(0x16b)]+0x4)+'\x0d'));}};}function f(){const _0x4959d1=_0x41a03d;process[_0x4959d1(0xf4)]['write'](_0x4959d1(0x15c));}function G(){return new Promise(_0x3bf1d6=>{const _0x5b8bae=_0x7ba9;let {stdin:_0x192349}=process,_0x1a11ab=_0x192349[_0x5b8bae(0x10e)];_0x192349[_0x5b8bae(0xc8)]&&_0x192349[_0x5b8bae(0xa4)](!0x0),_0x192349[_0x5b8bae(0xc2)](),_0x192349[_0x5b8bae(0xed)](_0x5b8bae(0x176));function _0x5dff84(_0x321638){const _0x32cb51=_0x5b8bae;_0x192349[_0x32cb51(0xd4)]('data',_0x5dff84),_0x192349[_0x32cb51(0xc8)]&&!_0x1a11ab&&_0x192349[_0x32cb51(0xa4)](!0x1),_0x192349[_0x32cb51(0xf0)]();let _0x5127dc=ae(_0x321638);_0x3bf1d6({'name':_0x5127dc,'sequence':_0x321638,'ctrl':_0x321638<='\x1a'&&_0x321638!=='\x0d','shift':!0x1});}_0x192349[_0x5b8bae(0x120)]('data',_0x5dff84);});}function H(_0xceac0e){const _0x26846d=_0x41a03d;let {stdin:_0x47c47f}=process;_0x47c47f['isTTY']&&_0x47c47f['setRawMode'](!0x0),_0x47c47f[_0x26846d(0xc2)](),_0x47c47f[_0x26846d(0xed)](_0x26846d(0x176));function _0x579f44(_0x35a087){_0xceac0e({'name':ae(_0x35a087),'sequence':_0x35a087});}return _0x47c47f['on'](_0x26846d(0x14e),_0x579f44),function(){const _0x2e9352=_0x26846d;_0x47c47f[_0x2e9352(0xd4)](_0x2e9352(0x14e),_0x579f44),_0x47c47f[_0x2e9352(0xc8)]&&_0x47c47f['setRawMode'](!0x1),_0x47c47f[_0x2e9352(0xf0)]();};}function ae(_0x5bd936){const _0x32ea5b=_0x41a03d;return _0x5bd936==='\x0d'||_0x5bd936==='\x0a'?_0x32ea5b(0x118):_0x5bd936==='\x1b'?_0x32ea5b(0xcf):_0x5bd936==='\x1b[A'?'up':_0x5bd936===_0x32ea5b(0x172)?_0x32ea5b(0x13d):_0x5bd936===_0x32ea5b(0x178)?_0x32ea5b(0x174):_0x5bd936===_0x32ea5b(0x13e)?_0x32ea5b(0xae):_0x5bd936==='\x7f'||_0x5bd936==='\x08'?'backspace':_0x5bd936==='\x03'?_0x32ea5b(0x10b):_0x5bd936;}async function ce(){const _0xc5fa68=_0x41a03d;if(f(),m(_0xc5fa68(0xc5)),X()){let _0x297a78=Z();console['log'](_0xc5fa68(0xd3)),console['log']('Your\x20identity:\x20'+_0x297a78[_0xc5fa68(0x134)](0x0,0x10)+'…\x0a'),console[_0xc5fa68(0xda)](_0xc5fa68(0x121)),await E();}else{console[_0xc5fa68(0xda)]('\x0aNo\x20identity\x20found.'),console[_0xc5fa68(0xda)](_0xc5fa68(0x14a)),await E();let _0x10f273=h(_0xc5fa68(0xbd));_0x10f273[_0xc5fa68(0xd2)]();let {publicKey:_0x1cf232}=Q();_0x10f273[_0xc5fa68(0xe2)](),console[_0xc5fa68(0xda)](_0xc5fa68(0xf1)),console[_0xc5fa68(0xda)]('\x20\x20'+_0x1cf232['slice'](0x0,0x10)+'…\x0a'),console[_0xc5fa68(0xda)](_0xc5fa68(0x121)),await E();}}async function B(_0x54c0c1=R){const _0x49822a=_0x41a03d;f(),m(_0x49822a(0x109));let _0x26d167='',_0x59e145=[],_0x4d259d=0x0,_0x34b53e=()=>{const _0x49997c=_0x49822a;f(),m(_0x49997c(0x109)),console[_0x49997c(0xda)](_0x49997c(0x15f)+_0x26d167+'_\x0a'),_0x59e145[_0x49997c(0x16b)]===0x0?console[_0x49997c(0xda)]('\x20\x20No\x20results.\x20Type\x20to\x20search\x20or\x20wait\x20for\x20peer\x20gossip.\x0a'):K(_0x59e145[_0x49997c(0x138)](_0xb4d436=>(_0xb4d436[_0x49997c(0xb5)]??_0xb4d436[_0x49997c(0xb8)])+'\x20\x20'+(_0xb4d436[_0x49997c(0x157)]??'')+'\x20\x20'+(_0xb4d436[_0x49997c(0x14c)]??'')),_0x4d259d),J('[↑↓]\x20navigate\x20\x20[ENTER]\x20install\x20\x20[L]\x20library\x20\x20[CTRL+C]\x20quit');},_0x4958b3=h(_0x49822a(0xe5));_0x4958b3[_0x49822a(0xd2)]();try{_0x59e145=await _0x54c0c1('');}catch{_0x59e145=[];}return _0x4958b3[_0x49822a(0xe2)](),_0x34b53e(),new Promise(_0x5dc7bf=>{let _0x2cd5c1=H(async({name:_0x5c2702,sequence:_0x2dd1e8})=>{const _0x9f8d74=_0x7ba9;if(_0x5c2702==='ctrl+c'&&(_0x2cd5c1(),process[_0x9f8d74(0xa7)](0x0)),_0x5c2702==='up'){_0x4d259d=Math[_0x9f8d74(0xf9)](0x0,_0x4d259d-0x1),_0x34b53e();return;}if(_0x5c2702===_0x9f8d74(0x13d)){_0x4d259d=Math[_0x9f8d74(0x142)](_0x59e145['length']-0x1,_0x4d259d+0x1),_0x34b53e();return;}if(_0x5c2702==='return'){if(_0x59e145['length']===0x0)return;let _0x1ada9a=_0x59e145[_0x4d259d];_0x2cd5c1(),f(),m(_0x9f8d74(0xa8)),console[_0x9f8d74(0xda)](_0x9f8d74(0x162)+_0x1ada9a[_0x9f8d74(0xb8)]+'…\x0a');let _0x217ee9=h(_0x9f8d74(0x147)+_0x1ada9a[_0x9f8d74(0xb8)]);_0x217ee9[_0x9f8d74(0xd2)]();try{await _(_0x1ada9a[_0x9f8d74(0xb8)]),_0x217ee9['stop'](),console[_0x9f8d74(0xda)](_0x9f8d74(0x12a)+_0x1ada9a[_0x9f8d74(0xb8)]+_0x9f8d74(0x135));}catch(_0x327dac){_0x217ee9[_0x9f8d74(0xe2)](),console['log'](_0x9f8d74(0x105)+_0x327dac['message']+_0x9f8d74(0x156));}await E(),_0x5dc7bf(B(_0x54c0c1));return;}if(_0x5c2702[_0x9f8d74(0x154)]()==='l'){_0x2cd5c1(),_0x5dc7bf(_0x9f8d74(0x12b));return;}if(_0x5c2702===_0x9f8d74(0xd6))_0x26d167=_0x26d167[_0x9f8d74(0x134)](0x0,-0x1);else{if(_0x2dd1e8[_0x9f8d74(0x16b)]===0x1&&_0x2dd1e8>='\x20')_0x26d167+=_0x2dd1e8;else return;}_0x4d259d=0x0;let _0x2cb6cc=h(_0x9f8d74(0x177));_0x2cb6cc['start']();try{_0x59e145=await _0x54c0c1(_0x26d167);}catch{_0x59e145=[];}_0x2cb6cc['stop'](),_0x34b53e();});});}async function C(_0x45f32a=T){f(),m('termill\x20—\x20library');let _0x1d0c70=re(),_0xd972ff=0x0,_0x55cbaa=()=>{const _0x119f79=_0x7ba9;f(),m(_0x119f79(0x132)),_0x1d0c70[_0x119f79(0x16b)]===0x0?console['log']('\x0a\x20\x20No\x20games\x20installed.\x20Press\x20H\x20to\x20discover\x20games.\x0a'):(console['log'](''),K(_0x1d0c70['map'](_0x3600b6=>(_0x3600b6[_0x119f79(0xb5)]??_0x3600b6[_0x119f79(0xb8)])+_0x119f79(0x116)+(_0x3600b6[_0x119f79(0x157)]??'?')),_0xd972ff)),J(_0x119f79(0x143));};return _0x55cbaa(),new Promise(_0x1503ce=>{let _0x324fbe=H(async({name:_0x12a306})=>{const _0x255ac5=_0x7ba9;if(_0x12a306===_0x255ac5(0x10b)&&(_0x324fbe(),process[_0x255ac5(0xa7)](0x0)),_0x12a306==='up'){_0xd972ff=Math[_0x255ac5(0xf9)](0x0,_0xd972ff-0x1),_0x55cbaa();return;}if(_0x12a306===_0x255ac5(0x13d)){_0xd972ff=Math[_0x255ac5(0x142)](_0x1d0c70['length']-0x1,_0xd972ff+0x1),_0x55cbaa();return;}if(_0x12a306==='return'&&_0x1d0c70[_0x255ac5(0x16b)]>0x0){let _0x48d104=_0x1d0c70[_0xd972ff];_0x324fbe(),f(),m(_0x255ac5(0x132));let _0x825ec3=h('Checking\x20'+_0x48d104['packageName']+_0x255ac5(0xd9));_0x825ec3['start']();let _0x4aeb91;try{_0x4aeb91=await _(_0x48d104[_0x255ac5(0xb8)]);}catch{_0x4aeb91={'alreadyCurrent':!0x0};}_0x825ec3[_0x255ac5(0xe2)](),_0x4aeb91[_0x255ac5(0xe6)]?console['log']('\x0a✓\x20'+_0x48d104[_0x255ac5(0xb8)]+_0x255ac5(0x112)):console[_0x255ac5(0xda)]('\x0a'+(_0x48d104[_0x255ac5(0xb5)]??_0x48d104[_0x255ac5(0xb8)])+_0x255ac5(0xb4)),_0x45f32a(_0x48d104[_0x255ac5(0x17b)]),_0x1503ce(C(_0x45f32a));return;}if(_0x12a306==='d'||_0x12a306==='D'){if(_0x1d0c70['length']===0x0)return;let _0x1a57ad=_0x1d0c70[_0xd972ff];if(_0x324fbe(),f(),m(_0x255ac5(0x132)),console['log'](_0x255ac5(0xd5)+(_0x1a57ad[_0x255ac5(0xb5)]??_0x1a57ad['packageName'])+'?\x20[Y/N]'),(await G())[_0x255ac5(0xc0)][_0x255ac5(0x154)]()==='y'){let _0x395217=h('Uninstalling\x20'+_0x1a57ad[_0x255ac5(0xb8)]+'…');_0x395217[_0x255ac5(0xd2)]();try{await oe(_0x1a57ad[_0x255ac5(0xb8)]),_0x395217['stop'](),console[_0x255ac5(0xda)](_0x255ac5(0x12a)+_0x1a57ad[_0x255ac5(0xb8)]+_0x255ac5(0xfe));}catch(_0x449c71){_0x395217[_0x255ac5(0xe2)](),console[_0x255ac5(0xda)](_0x255ac5(0x131)+_0x449c71['message']+_0x255ac5(0x156));}await E();}_0x1503ce(C(_0x45f32a));return;}if(_0x12a306==='h'||_0x12a306==='H'||_0x12a306===_0x255ac5(0xcf)){_0x324fbe(),_0x1503ce(_0x255ac5(0x173));return;}});});}async function E(){let _0x53523b;do _0x53523b=await G();while(_0x53523b['name']!=='return');}import{readFileSync as _0x136cbc,existsSync as _0x247463,readdirSync as _0x5c735b,statSync as _0x1ac5b3}from'node:fs';import{join as _0x39427a,resolve as _0x520e6d,isAbsolute as _0xe3300b}from'node:path';import{execSync as _0x1c9da8}from'node:child_process';function tt(_0x31bddd){const _0x2aea36=_0x41a03d;return _0x31bddd[_0x2aea36(0x153)]('.')||_0x31bddd[_0x2aea36(0x153)]('/')||_0xe3300b(_0x31bddd);}function nt(_0x540b40){const _0x57bb2e=_0x41a03d;let _0x4af7ef=_0x39427a(_0x520e6d(_0x540b40),'package.json');if(!_0x247463(_0x4af7ef))return null;try{return JSON[_0x57bb2e(0xf3)](_0x136cbc(_0x4af7ef,_0x57bb2e(0x176)));}catch{return null;}}function rt(_0x424ca9){const _0x1de596=_0x41a03d;try{return JSON[_0x1de596(0xf3)](_0x1c9da8('npm\x20view\x20'+_0x424ca9+_0x1de596(0xd8),{'encoding':_0x1de596(0x176)}));}catch{return null;}}function pe(_0x1d8a84,_0xc29e6f=[]){const _0x128757=_0x41a03d;let _0x5ae646=[];try{for(let _0x1d8510 of _0x5c735b(_0x1d8a84)){if(_0xc29e6f['includes'](_0x1d8510))continue;let _0x22799d=_0x39427a(_0x1d8a84,_0x1d8510),_0x3bb944;try{_0x3bb944=_0x1ac5b3(_0x22799d);}catch{continue;}_0x3bb944['isDirectory']()?_0x5ae646['push'](...pe(_0x22799d,_0xc29e6f)):/\.(js|mjs|cjs)$/[_0x128757(0x149)](_0x1d8510)&&_0x5ae646[_0x128757(0xdd)](_0x22799d);}}catch{}return _0x5ae646;}function ue(_0x53eff6){const _0x45ce68=_0x41a03d;let _0xe8b6eb=tt(_0x53eff6),_0x1384d7=_0xe8b6eb?nt(_0x53eff6):rt(_0x53eff6),_0x26d68e=[];if(!_0x1384d7)return _0x26d68e[_0x45ce68(0xdd)]({'check':_0x45ce68(0x10f),'passed':!0x1,'message':_0xe8b6eb?_0x45ce68(0xfa)+_0x53eff6:'Could\x20not\x20fetch\x20package\x20info\x20for\x20\x22'+_0x53eff6+'\x22\x20from\x20npm'}),_0x26d68e;let _0x12e0ba=_0x1384d7[_0x45ce68(0x119)],_0xa125a0=typeof _0x12e0ba==_0x45ce68(0x15d)?_0x12e0ba:_0x12e0ba&&typeof _0x12e0ba==_0x45ce68(0xde)?Object[_0x45ce68(0x17c)](_0x12e0ba)[0x0]:null,_0x48f4da=!!_0xa125a0;_0x26d68e[_0x45ce68(0xdd)]({'check':_0x45ce68(0xdb),'passed':_0x48f4da,'message':_0x48f4da?_0x45ce68(0x102)+JSON[_0x45ce68(0x133)](_0x12e0ba):'Missing\x20\x22bin\x22\x20field\x20in\x20package.json\x20—\x20add\x20a\x20bin\x20entry\x20pointing\x20to\x20your\x20entry\x20file'});let _0x4b7014=!0x1;if(_0xe8b6eb&&_0x48f4da&&(_0x4b7014=_0x247463(_0x39427a(_0x520e6d(_0x53eff6),_0xa125a0)),_0x26d68e[_0x45ce68(0xdd)]({'check':_0x45ce68(0x12d),'passed':_0x4b7014,'message':_0x4b7014?'bin\x20file\x20found:\x20'+_0xa125a0:_0x45ce68(0xb2)+_0xa125a0})),_0xe8b6eb&&_0x48f4da&&_0x4b7014){let _0x5165f8=_0x39427a(_0x520e6d(_0x53eff6),_0xa125a0),_0x2bcc4f=!0x1;try{_0x2bcc4f=_0x136cbc(_0x5165f8,_0x45ce68(0x176))[_0x45ce68(0x153)](_0x45ce68(0xdf));}catch{}_0x26d68e['push']({'check':_0x45ce68(0xc9),'passed':_0x2bcc4f,'message':_0x2bcc4f?_0x45ce68(0x13a):_0xa125a0+_0x45ce68(0x110)});}let _0x1b36c8=(Array['isArray'](_0x1384d7[_0x45ce68(0x164)])?_0x1384d7[_0x45ce68(0x164)]:[])['includes']('termill');_0x26d68e['push']({'check':'keywords\x20includes\x20\x22termill\x22','passed':_0x1b36c8,'message':_0x1b36c8?_0x45ce68(0x12f):'Add\x20\x22termill\x22\x20to\x20the\x20keywords\x20array\x20in\x20package.json\x20for\x20discoverability'});let _0x54b960=typeof _0x1384d7[_0x45ce68(0x14c)]==_0x45ce68(0x15d)&&_0x1384d7[_0x45ce68(0x14c)][_0x45ce68(0x14b)]()[_0x45ce68(0x16b)]>0x0;_0x26d68e[_0x45ce68(0xdd)]({'check':_0x45ce68(0x10d),'passed':_0x54b960,'message':_0x54b960?_0x45ce68(0x107)+_0x1384d7['description']+'\x22':'Missing\x20or\x20empty\x20\x22description\x22\x20field\x20in\x20package.json'});let _0x3a1166=_0x1384d7[_0x45ce68(0xad)],_0x233915=!!_0x3a1166&&typeof _0x3a1166==_0x45ce68(0xde);if(_0x26d68e[_0x45ce68(0xdd)]({'check':_0x45ce68(0x108),'passed':_0x233915,'message':_0x233915?_0x45ce68(0x17a):_0x45ce68(0x122)}),_0x233915){let _0x1dd4a2=typeof _0x3a1166[_0x45ce68(0xc0)]==_0x45ce68(0x15d)&&_0x3a1166[_0x45ce68(0xc0)][_0x45ce68(0x14b)]()[_0x45ce68(0x16b)]>0x0,_0x1e225e=typeof _0x3a1166[_0x45ce68(0x14c)]=='string'&&_0x3a1166[_0x45ce68(0x14c)]['trim']()[_0x45ce68(0x16b)]>0x0;_0x26d68e[_0x45ce68(0xdd)]({'check':_0x45ce68(0x166),'passed':_0x1dd4a2,'message':_0x1dd4a2?_0x45ce68(0xec)+_0x3a1166['name']+'\x22':_0x45ce68(0x129)}),_0x26d68e[_0x45ce68(0xdd)]({'check':_0x45ce68(0xc3),'passed':_0x1e225e,'message':_0x1e225e?'termill.description:\x20\x22'+_0x3a1166[_0x45ce68(0x14c)]+'\x22':_0x45ce68(0x16e)});}if(_0xe8b6eb){let _0x2ad2cf=!0x1,_0x3ca3da=pe(_0x520e6d(_0x53eff6),[_0x45ce68(0xef),_0x45ce68(0x16f),'dist']);for(let _0x309e3d of _0x3ca3da)try{if(_0x136cbc(_0x309e3d,'utf8')[_0x45ce68(0xb6)](_0x45ce68(0xf6))){_0x2ad2cf=!0x0;break;}}catch{}_0x26d68e['push']({'check':_0x45ce68(0x136),'passed':_0x2ad2cf,'message':_0x2ad2cf?_0x45ce68(0xba):_0x45ce68(0xbf)});}return _0x26d68e;}import{mkdirSync as _0x529fac,writeFileSync as _0x1db138,existsSync as _0x104cc5}from'node:fs';import{join as _0x253e19}from'node:path';import{createInterface as _0x219bc1}from'node:readline';function P(_0x8df6f3,_0xac6b66){return new Promise(_0xfbfde7=>{const _0x585eb7=_0x7ba9;_0x8df6f3['question'](_0xac6b66,_0x5a08fd=>_0xfbfde7(_0x5a08fd[_0x585eb7(0x14b)]()));});}async function me(){const _0x46fc45=_0x41a03d;let _0x559653=_0x219bc1({'input':process[_0x46fc45(0x169)],'output':process[_0x46fc45(0xf4)]});console[_0x46fc45(0xda)]('\x0atermill\x20init\x20—\x20scaffold\x20a\x20new\x20termill\x20game\x20project\x0a');let _0xd80268=await P(_0x559653,_0x46fc45(0x14f)),_0x187bfd=await P(_0x559653,_0x46fc45(0xe1)),_0x250a68=await P(_0x559653,_0x46fc45(0x106)),_0x386070=await P(_0x559653,_0x46fc45(0x125)),_0x338cff=await P(_0x559653,'Category\x20(e.g.\x20puzzle,\x20action,\x20arcade)\x20[optional,\x20press\x20Enter\x20to\x20skip]:\x20');_0x559653[_0x46fc45(0x15b)](),_0xd80268||(console[_0x46fc45(0x10a)](_0x46fc45(0x101)),process[_0x46fc45(0xa7)](0x1));let _0x5f5b06=_0x253e19(process[_0x46fc45(0x11d)](),_0xd80268);_0x104cc5(_0x5f5b06)&&(console[_0x46fc45(0x10a)](_0x46fc45(0x15a)+_0xd80268+_0x46fc45(0xe4)),process[_0x46fc45(0xa7)](0x1)),_0x529fac(_0x5f5b06,{'recursive':!0x0});let _0x279dbd={'name':_0xd80268,'version':'1.0.0','description':_0x250a68||'','main':_0x46fc45(0xd7),'bin':{[_0xd80268]:_0x46fc45(0x114)},'keywords':[_0x46fc45(0xad)],'author':_0x386070||'','license':_0x46fc45(0xbe),'termill':{'name':_0x187bfd||_0xd80268,'description':_0x250a68||'','launchCommand':_0xd80268,..._0x338cff?{'category':_0x338cff}:{}}};_0x1db138(_0x253e19(_0x5f5b06,_0x46fc45(0xb1)),JSON['stringify'](_0x279dbd,null,0x2)+'\x0a',_0x46fc45(0x176));let _0xe48516=[_0x46fc45(0xdf),'','//\x20'+(_0x187bfd||_0xd80268)+_0x46fc45(0x14d),_0x46fc45(0x17d),'',_0x46fc45(0xc6)+(_0x187bfd||_0xd80268)+_0x46fc45(0xac),_0x46fc45(0xe8),'',_0x46fc45(0x167),'process.stdin.setEncoding(\x27utf8\x27);',_0x46fc45(0x150),_0x46fc45(0x144),_0x46fc45(0x170),'']['join']('\x0a');_0x1db138(_0x253e19(_0x5f5b06,_0x46fc45(0xd7)),_0xe48516,'utf8'),_0x1db138(_0x253e19(_0x5f5b06,'.gitignore'),_0x46fc45(0x152),'utf8');let _0x29ab2e=['#\x20'+(_0x187bfd||_0xd80268),'',_0x250a68||'A\x20termill\x20game.','',_0x46fc45(0x128),'',_0x46fc45(0xcb),'npm\x20install\x20-g\x20'+_0xd80268,_0x46fc45(0xad),_0x46fc45(0x161),'',_0x46fc45(0xe7),'','```bash',_0xd80268,_0x46fc45(0x161),'',_0x46fc45(0xe9),'',_0x46fc45(0xbe),'']['join']('\x0a');_0x1db138(_0x253e19(_0x5f5b06,_0x46fc45(0xc1)),_0x29ab2e,_0x46fc45(0x176)),console['log']('\x0a✓\x20Project\x20scaffolded\x20at\x20./'+_0xd80268+'/'),console[_0x46fc45(0xda)]('\x0aNext\x20steps:'),console[_0x46fc45(0xda)]('\x20\x20cd\x20'+_0xd80268),console[_0x46fc45(0xda)]('\x20\x20npm\x20link\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20link\x20globally\x20for\x20local\x20testing'),console['log'](_0x46fc45(0x13b)),console[_0x46fc45(0xda)](_0x46fc45(0xcc)),console[_0x46fc45(0xda)]('');}function _0x259c(){const _0x292b46=['string','dependencies','\x0aSearch:\x20','osascript','```','\x0aInstalling\x20','floor','keywords','darwin','termill.name\x20is\x20set','process.stdin.resume();','3188116DAQaXO','stdin','\x20version\x20--json','length','3LlTwAA','[7m','termill.description\x20is\x20missing\x20or\x20empty','.git','});','function','\x1b[B','home','right','pkcs8','utf8','Searching…','\x1b[C','platform','termill\x20metadata\x20block\x20found','launchCommand','values','//\x20TODO:\x20implement\x20your\x20game\x20here','setRawMode','pem','https://registry.npmjs.org/-/v1/search','exit','termill\x20—\x20installing','8378736fuvRFB','\x20keywords:termill','do\x20shell\x20script\x20\x22open\x20-a\x20Terminal\x20','!\x27);','termill','left','963yvTKHv','filter','package.json','bin\x20file\x20not\x20found\x20at\x20path:\x20','env','\x20is\x20up\x20to\x20date.\x20Launching…','title','includes','timeout','packageName','toString','process.exit()\x20call\x20found\x20in\x20source\x20files','245201ilWRhU','message','Generating\x20Ed25519\x20keypair…','MIT','WARNING:\x20No\x20process.exit()\x20found.\x20termill\x20spawns\x20a\x20new\x20terminal\x20window\x20—\x20your\x20game\x20must\x20call\x20process.exit()\x20on\x20quit\x20to\x20close\x20it\x20cleanly','name','README.md','resume','termill.description\x20is\x20set','347462knFXPq','termill\x20—\x20identity','console.log(\x27Welcome\x20to\x20','check','isTTY','bin\x20file\x20has\x20#!/usr/bin/env\x20node\x20shebang','[termill]\x20Fatal\x20error:','```bash','\x20\x20npm\x20publish\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20publish\x20to\x20npm\x20when\x20ready','write','?text=','escape','5802188YvbRwm','/peers','start','\x0aWelcome\x20back!','removeListener','\x0aUninstall\x20','backspace','index.js','\x20--json','\x20for\x20updates…','log','bin\x20field\x20present','win32','push','object','#!/usr/bin/env\x20node','peers.json','Display\x20name\x20(e.g.\x20My\x20Termill\x20Game):\x20','stop','2059025EdyroT','\x22\x20already\x20exists\x20in\x20the\x20current\x20folder.','Discovering\x20games…','updated','Or\x20run\x20directly:','console.log(\x27Press\x20ENTER\x20to\x20quit.\x27);','##\x20License','npm\x20uninstall\x20-g\x20','columns','termill.name:\x20\x22','setEncoding','all','node_modules','pause','\x0aIdentity\x20created.\x20Your\x20public\x20key:','flat','parse','stdout','init','process.exit(','7YJWrer','cmd.exe','max','No\x20package.json\x20found\x20at\x20','argv','id_ed25519','Init\x20failed:','\x20uninstalled.\x20Press\x20ENTER\x20to\x20continue.','objects','[0m','\x0aError:\x20package\x20name\x20is\x20required.','bin\x20field\x20found:\x20','id_ed25519.pub','[1m','\x0a✗\x20Install\x20failed:\x20','Short\x20description:\x20','description:\x20\x22','termill\x20metadata\x20block\x20present','termill\x20—\x20discover','error','ctrl+c','npm\x20view\x20','description\x20is\x20non-empty','isRaw','package.json\x20readable','\x20is\x20missing\x20\x22#!/usr/bin/env\x20node\x22\x20on\x20line\x201','/games','\x20updated\x20to\x20latest.\x20Launching…','TERM','./index.js','unknown','\x20\x20v','\x22\x20is\x20missing\x20a\x20\x22termill\x22\x20property\x20in\x20its\x20package.json','return','bin','find','der','.termill','cwd','toISOString','ignore','once','Press\x20ENTER\x20to\x20continue.','Missing\x20\x22termill\x22\x20block\x20in\x20package.json\x20—\x20add\x20{\x20\x22termill\x22:\x20{\x20\x22name\x22:\x20\x22...\x22,\x20\x22description\x22:\x20\x22...\x22,\x20\x22launchCommand\x22:\x20\x22...\x22\x20}\x20}','validate','keys','Author\x20(e.g.\x20Jane\x20Doe\x20<jane@example.com>):\x20','unref','forEach','##\x20Play','termill.name\x20is\x20missing\x20or\x20empty','\x0a✓\x20','library','linux','bin\x20file\x20exists','Package\x20\x22','keywords\x20includes\x20\x22termill\x22','json','\x0a✗\x20Uninstall\x20failed:\x20','termill\x20—\x20library','stringify','slice','\x20installed.\x20Press\x20ENTER\x20to\x20continue.','process.exit()\x20call\x20found\x20(warn\x20only)','130VVKCEv','map','padEnd','Shebang\x20found','\x20\x20termill\x20validate\x20.\x20\x20\x20\x20#\x20check\x20compliance\x20before\x20publishing','then','down','\x1b[D','catch','passed','12872EHTwAV','min','[↑↓]\x20navigate\x20\x20[ENTER]\x20launch\x20\x20[D]\x20uninstall\x20\x20[H/ESC]\x20home\x20\x20[CTRL+C]\x20quit','\x20\x20process.exit(0);','library.json','keywords:termill','npm\x20install\x20-g\x20','repeat','test','Press\x20ENTER\x20to\x20generate\x20a\x20new\x20keypair\x20and\x20create\x20your\x20identity.\x0a','trim','description','\x20—\x20entry\x20point','data','Package\x20name\x20(npm\x20package\x20name,\x20e.g.\x20my-termill-game):\x20','process.stdin.once(\x27data\x27,\x20()\x20=>\x20{','spki','node_modules\x0a','startsWith','toLowerCase','ed25519','.\x20Press\x20ENTER\x20to\x20continue.','version','npm\x20list\x20-g\x20--json\x20','&size=20','\x0aError:\x20directory\x20\x22','close','\x1b[2J\x1b[H'];_0x259c=function(){return _0x292b46;};return _0x259c();}function at(){_0x485479(w,{'recursive':!0x0}),_0x485479(x,{'recursive':!0x0});}async function ct(){const _0x1489e3=_0x41a03d;at(),await ce();let _0x3cee05=_0x1489e3(0x173);for(;;)_0x3cee05===_0x1489e3(0x173)?_0x3cee05=await B(R):_0x3cee05===_0x1489e3(0x12b)?_0x3cee05=await C(T):_0x3cee05&&typeof _0x3cee05[_0x1489e3(0x13c)]==_0x1489e3(0x171)?_0x3cee05=await _0x3cee05:_0x3cee05=_0x1489e3(0x173);}var de=process['argv'][0x2];if(de===_0x41a03d(0x123)){let e=process[_0x41a03d(0xfb)][0x3]??'.',t=ue(e),r=!0x0;for(let n of t)n[_0x41a03d(0x140)]?console[_0x41a03d(0xda)]('✓\x20'+n['check']):n[_0x41a03d(0xc7)][_0x41a03d(0xb6)]('warn\x20only')?console[_0x41a03d(0xda)]('⚠\x20'+n[_0x41a03d(0xc7)]+':\x20'+n[_0x41a03d(0xbc)]):(console[_0x41a03d(0xda)]('✗\x20'+n['check']+':\x20'+n[_0x41a03d(0xbc)]),r=!0x1);process[_0x41a03d(0xa7)](r?0x0:0x1);}else de===_0x41a03d(0xf5)?me()[_0x41a03d(0x13f)](_0x7880b3=>{const _0x4ad054=_0x41a03d;console[_0x4ad054(0x10a)](_0x4ad054(0xfd),_0x7880b3['message']??_0x7880b3),process['exit'](0x1);}):ct()[_0x41a03d(0x13f)](_0x35e990=>{const _0x47a90d=_0x41a03d;console[_0x47a90d(0x10a)](_0x47a90d(0xca),_0x35e990[_0x47a90d(0xbc)]??_0x35e990),process['exit'](0x1);});
|
|
2
|
+
const _0x396004=_0x24d8;(function(_0xc9e785,_0x47e230){const _0x179e8e=_0x24d8,_0x11e79a=_0xc9e785();while(!![]){try{const _0x38b6d1=-parseInt(_0x179e8e(0x1c8))/0x1+-parseInt(_0x179e8e(0x1d7))/0x2*(-parseInt(_0x179e8e(0x19a))/0x3)+parseInt(_0x179e8e(0x19f))/0x4+parseInt(_0x179e8e(0x1dd))/0x5+-parseInt(_0x179e8e(0x1b5))/0x6*(parseInt(_0x179e8e(0x204))/0x7)+-parseInt(_0x179e8e(0x1b3))/0x8*(-parseInt(_0x179e8e(0x1e4))/0x9)+-parseInt(_0x179e8e(0x211))/0xa*(parseInt(_0x179e8e(0x1eb))/0xb);if(_0x38b6d1===_0x47e230)break;else _0x11e79a['push'](_0x11e79a['shift']());}catch(_0x503642){_0x11e79a['push'](_0x11e79a['shift']());}}}(_0x5be1,0x87774));import{mkdirSync as _0x18ada5}from'node:fs';import{homedir as _0x556349}from'node:os';import{join as _0x16adfa}from'node:path';var w=_0x16adfa(_0x556349(),_0x396004(0x1df)),x=_0x16adfa(w,_0x396004(0x1e0)),k=_0x16adfa(w,_0x396004(0x224)),b=_0x16adfa(w,_0x396004(0x1f4)),O=[];import{generateKeyPairSync as _0x40d1e4,sign as _0x1f85c6,verify as _0x2730e9,createPublicKey as _0x5c17b2}from'node:crypto';import{readFileSync as _0x580350,writeFileSync as _0x3716a9,existsSync as _0x350367,mkdirSync as _0x16dc8b}from'node:fs';import{join as _0x3a0108}from'node:path';var z=_0x3a0108(x,_0x396004(0x1cc)),D=_0x3a0108(x,_0x396004(0x1c3));function Q(){const _0x1e8b89=_0x396004;_0x16dc8b(x,{'recursive':!0x0});let {privateKey:_0x155221,publicKey:_0x3c0607}=_0x40d1e4('ed25519',{'privateKeyEncoding':{'type':_0x1e8b89(0x251),'format':'pem'},'publicKeyEncoding':{'type':_0x1e8b89(0x1ab),'format':'der'}}),_0x44fb2f=_0x3c0607[_0x1e8b89(0x212)](-0x20)[_0x1e8b89(0x25e)]('hex');return _0x3716a9(z,_0x155221,{'encoding':'utf8','mode':0x180}),_0x3716a9(D,_0x44fb2f,{'encoding':'utf8','mode':0x1a4}),{'publicKey':_0x44fb2f};}function X(){return _0x350367(z)&&_0x350367(D);}function Z(){const _0x12170b=_0x396004;return _0x580350(D,_0x12170b(0x24c))[_0x12170b(0x196)]();}import{readFileSync as _0x301c2e,writeFileSync as _0x3ab2c9,existsSync as _0x23ae4c,mkdirSync as _0x1bf9a8}from'node:fs';import{dirname as _0x1ee6d8}from'node:path';function _0x5be1(){const _0xf680cc=['\x1b[B','Display\x20name\x20(e.g.\x20My\x20Termill\x20Game):\x20','bin\x20file\x20has\x20#!/usr/bin/env\x20node\x20shebang','check','repeat','termill.name:\x20\x22','columns','env','keywords','filter','node_modules\x0a','termill.description\x20is\x20missing\x20or\x20empty','exit','\x20is\x20up\x20to\x20date.\x20Launching…','name','objects','\x0aSearch:\x20','Missing\x20or\x20empty\x20\x22description\x22\x20field\x20in\x20package.json','.git','cwd','home','setEncoding','\x0aWelcome\x20back!','keywords\x20includes\x20\x22termill\x22','Author\x20(e.g.\x20Jane\x20Doe\x20<jane@example.com>):\x20','\x0aNo\x20identity\x20found.','description\x20is\x20non-empty','A\x20termill\x20game.','toISOString','//\x20','\x20\x20cd\x20','utf8','&size=20','//\x20TODO:\x20implement\x20your\x20game\x20here','Discovering\x20games…','termill\x20—\x20discover','pkcs8','function','games','termill\x20metadata\x20block\x20present','\x20version\x20--json','\x0atermill\x20init\x20—\x20scaffold\x20a\x20new\x20termill\x20game\x20project\x0a','termill.description:\x20\x22','linux','No\x20package.json\x20found\x20at\x20','backspace','!\x27);','floor','Your\x20identity:\x20','toString','termill','error','dependencies','xterm','trim','Missing\x20\x22bin\x22\x20field\x20in\x20package.json\x20—\x20add\x20a\x20bin\x20entry\x20pointing\x20to\x20your\x20entry\x20file','\x0aInstalling\x20','\x0a\x20\x20No\x20games\x20installed.\x20Press\x20H\x20to\x20discover\x20games.\x0a','801819FEolLB','log','console.log(\x27Welcome\x20to\x20','MIT','Searching…','1980828RwVNhS','process.exit()\x20call\x20found\x20in\x20source\x20files','bin\x20field\x20present','\x20\x20No\x20results.\x20Type\x20to\x20search\x20or\x20wait\x20for\x20peer\x20gossip.\x0a','npm\x20install\x20-g\x20','bin\x20file\x20found:\x20','bin\x20file\x20exists','pause','toLowerCase','termill\x20—\x20installing','[0m','\x0aError:\x20package\x20name\x20is\x20required.','spki','argv','termill.description\x20is\x20set','version','description','```bash','\x1b[2J\x1b[H','\x20\x20process.exit(0);','2160632quljvZ','.\x20Press\x20ENTER\x20to\x20continue.','132Smshib','packageName','\x0a✓\x20','parse','Add\x20\x22termill\x22\x20to\x20the\x20keywords\x20array\x20in\x20package.json\x20for\x20discoverability','message','npm\x20uninstall\x20-g\x20','description:\x20\x22','object','validate','\x20keywords:termill','\x0aError:\x20directory\x20\x22','\x20installed.\x20Press\x20ENTER\x20to\x20continue.','Could\x20not\x20fetch\x20package\x20info\x20for\x20\x22','id_ed25519.pub','json','\x1b[A','Init\x20failed:','https://registry.npmjs.org/-/v1/search','458997oYKJmm','?text=','bin\x20field\x20found:\x20','bin','id_ed25519','flat','[termill]\x20Fatal\x20error:','includes','#!/usr/bin/env\x20node','package','start','length','all','process.stdin.resume();','termill\x20—\x20identity','6kQogeK','?\x20[Y/N]','\x20—\x20entry\x20point','stringify','\x0aNext\x20steps:','\x0a✓\x20Project\x20scaffolded\x20at\x20./','148600SkkUDd','osascript','.termill','keys','##\x20License','max','startsWith','27SBJARN','termill\x20—\x20library','timeout','data','values','Checking\x20','unknown','1386yLVELq','stop','[2m','\x22\x20already\x20exists\x20in\x20the\x20current\x20folder.','inherit','find','removeListener','question','Category\x20(e.g.\x20puzzle,\x20action,\x20arcade)\x20[optional,\x20press\x20Enter\x20to\x20skip]:\x20','peers.json','left','min','process.stdin.once(\x27data\x27,\x20()\x20=>\x20{','title','catch','map','do\x20shell\x20script\x20\x22open\x20-a\x20Terminal\x20','\x0aIdentity\x20created.\x20Your\x20public\x20key:','push','library','/games','return','escape','once','package.json','106106OrHbUK','isArray','/peers','WARNING:\x20No\x20process.exit()\x20found.\x20termill\x20spawns\x20a\x20new\x20terminal\x20window\x20—\x20your\x20game\x20must\x20call\x20process.exit()\x20on\x20quit\x20to\x20close\x20it\x20cleanly','process.exit()\x20call\x20found\x20(warn\x20only)','termill.name\x20is\x20set','launchCommand','```','./index.js','write','down','string','node_modules','62670SmthPz','slice','cmd.exe','\x20uninstalled.\x20Press\x20ENTER\x20to\x20continue.','\x20\x20npm\x20link\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20link\x20globally\x20for\x20local\x20testing','warn\x20only','stdout','index.js','\x20is\x20missing\x20\x22#!/usr/bin/env\x20node\x22\x20on\x20line\x201','keywords:termill','win32','npm\x20list\x20-g\x20--json\x20','isTTY','package.json\x20readable','\x22\x20from\x20npm','isDirectory','Press\x20ENTER\x20to\x20continue.','npm\x20view\x20','README.md','library.json','resume','bin\x20file\x20not\x20found\x20at\x20path:\x20','ctrl+c','init','\x1b[C','darwin','setRawMode','\x0a✗\x20Install\x20failed:\x20'];_0x5be1=function(){return _0xf680cc;};return _0x5be1();}function N(){const _0x48b505=_0x396004;if(!_0x23ae4c(k))return[];try{return JSON[_0x48b505(0x1b8)](_0x301c2e(k,_0x48b505(0x24c)));}catch{return[];}}function q(_0x517a70){const _0x1e307f=_0x396004;_0x1bf9a8(_0x1ee6d8(k),{'recursive':!0x0}),_0x3ab2c9(k,JSON[_0x1e307f(0x1da)](_0x517a70,null,0x2),_0x1e307f(0x24c));}function ee(_0x415f0a){const _0x243cba=_0x396004;let _0x3f92d4=N()[_0x243cba(0x236)](_0x215025=>_0x215025[_0x243cba(0x1b6)]!==_0x415f0a[_0x243cba(0x1b6)]);_0x3f92d4[_0x243cba(0x1fd)](_0x415f0a),q(_0x3f92d4);}function te(_0x4e000e){const _0x437c0a=_0x396004;return N()[_0x437c0a(0x1f0)](_0x2c1e5b=>_0x2c1e5b[_0x437c0a(0x1b6)]===_0x4e000e)??null;}function ne(_0x4cfdaa){const _0x1d6c12=_0x396004;let _0x5bcdea=N()[_0x1d6c12(0x236)](_0xf711b9=>_0xf711b9[_0x1d6c12(0x1b6)]!==_0x4cfdaa);q(_0x5bcdea);}function re(){return N();}import{execSync as _0x221e0e}from'node:child_process';import{readFileSync as _0x44f2a7}from'node:fs';import{join as _0x520f8b}from'node:path';function Te(_0x4d3b9b){const _0x19fa7d=_0x396004;let _0x3071a9=_0x221e0e('npm\x20root\x20-g',{'encoding':_0x19fa7d(0x24c)})['trim'](),_0x3853c7=_0x520f8b(_0x3071a9,_0x4d3b9b,_0x19fa7d(0x203)),_0x5b8f9a=JSON[_0x19fa7d(0x1b8)](_0x44f2a7(_0x3853c7,'utf8'));if(!_0x5b8f9a['termill'])throw new Error('Package\x20\x22'+_0x4d3b9b+'\x22\x20is\x20missing\x20a\x20\x22termill\x22\x20property\x20in\x20its\x20package.json');return _0x5b8f9a['termill'];}function Re(_0x317013){const _0x1b56c6=_0x396004;try{let _0x26b46a=JSON[_0x1b56c6(0x1b8)](_0x221e0e(_0x1b56c6(0x222)+_0x317013+_0x1b56c6(0x255),{'encoding':_0x1b56c6(0x24c)}));return typeof _0x26b46a==_0x1b56c6(0x20f)?_0x26b46a:String(_0x26b46a);}catch{return _0x1b56c6(0x1ea);}}async function _(_0x1fb051){const _0x2fc392=_0x396004;let _0x4cdec5=te(_0x1fb051);if(_0x4cdec5){let _0x5c54be=Re(_0x1fb051);if(_0x5c54be!==_0x2fc392(0x1ea)&&_0x5c54be===_0x4cdec5[_0x2fc392(0x1ae)])return{'alreadyCurrent':!0x0};}_0x221e0e(_0x2fc392(0x1a3)+_0x1fb051,{'stdio':_0x2fc392(0x1ef)});let _0x70b099=Te(_0x1fb051),_0x4d021b=JSON[_0x2fc392(0x1b8)](_0x221e0e(_0x2fc392(0x21c)+_0x1fb051,{'encoding':_0x2fc392(0x24c)}))[_0x2fc392(0x261)]?.[_0x1fb051]?.[_0x2fc392(0x1ae)]??_0x2fc392(0x1ea);return ee({'packageName':_0x1fb051,'title':_0x70b099[_0x2fc392(0x1f8)]??_0x1fb051,'description':_0x70b099['description']??'','version':_0x4d021b,'launchCommand':_0x70b099[_0x2fc392(0x20a)],'installedAt':new Date()[_0x2fc392(0x249)]()}),_0x4cdec5?{'updated':!0x0}:{};}async function oe(_0x171a19){const _0x277e02=_0x396004;_0x221e0e(_0x277e02(0x1bb)+_0x171a19,{'stdio':_0x277e02(0x1ef)}),ne(_0x171a19);}import{spawn as _0x403c19}from'node:child_process';function Ae(){const _0x1483fd=_0x396004;let _0x1ae93f=process['platform'];return _0x1ae93f==='win32'||_0x1ae93f===_0x1483fd(0x22a)?_0x1ae93f:_0x1483fd(0x258);}function Le(_0x37b965,_0xa7c98f){const _0x255d15=_0x396004;switch(_0xa7c98f){case _0x255d15(0x21b):return{'cmd':_0x255d15(0x213),'args':['/c',_0x255d15(0x1d2),_0x255d15(0x213),'/k',_0x37b965],'options':{'detached':!0x0,'shell':!0x1}};case _0x255d15(0x22a):return{'cmd':_0x255d15(0x1de),'args':['-e',_0x255d15(0x1fb)+_0x37b965+'\x22'],'options':{'detached':!0x0}};case _0x255d15(0x258):default:return{'cmd':process[_0x255d15(0x234)]['TERM']??_0x255d15(0x262),'args':['-e',_0x37b965],'options':{'detached':!0x0}};}}function T(_0x4db261){let {cmd:_0x3f9983,args:_0x15c087,options:_0x1d6f34}=Le(_0x4db261,Ae());_0x403c19(_0x3f9983,_0x15c087,{..._0x1d6f34,'stdio':'ignore'})['unref']();}import{readFileSync as _0x12d8de,writeFileSync as _0x2d9afa,existsSync as _0x4d1270,mkdirSync as _0x4bba43}from'node:fs';import{dirname as _0x16709c}from'node:path';function Je(){const _0x3993e9=_0x396004;if(!_0x4d1270(b))return[...O];try{return JSON['parse'](_0x12d8de(b,_0x3993e9(0x24c)));}catch{return[...O];}}function Ge(_0x325869){const _0x2e6487=_0x396004;_0x4bba43(_0x16709c(b),{'recursive':!0x0}),_0x2d9afa(b,JSON['stringify'](_0x325869,null,0x2),_0x2e6487(0x24c));}async function He(_0x245132){const _0x58ba65=_0x396004;try{let _0x4fe654=await fetch(_0x245132+_0x58ba65(0x1ff),{'signal':AbortSignal[_0x58ba65(0x1e6)](0x1388)});return _0x4fe654['ok']?await _0x4fe654['json']():[];}catch{return[];}}async function Be(_0x343f8e){const _0x1f577c=_0x396004;try{let _0x3dc9fe=await fetch(_0x343f8e+_0x1f577c(0x206),{'signal':AbortSignal[_0x1f577c(0x1e6)](0x1388)});return _0x3dc9fe['ok']?await _0x3dc9fe[_0x1f577c(0x1c4)]():[];}catch{return[];}}async function se(){const _0x425bb1=_0x396004;let _0x4acc42=Je(),[_0x2a7ed9,_0x5164a8]=await Promise['all']([Promise[_0x425bb1(0x1d4)](_0x4acc42[_0x425bb1(0x1fa)](_0x57ecc1=>He(_0x57ecc1))),Promise[_0x425bb1(0x1d4)](_0x4acc42['map'](_0x3c9772=>Be(_0x3c9772)))]),_0x5bc3aa=_0x2a7ed9[_0x425bb1(0x1cd)](),_0x55fffb=_0x5164a8[_0x425bb1(0x1cd)](),_0x407eec=[...new Set([..._0x4acc42,..._0x55fffb])];return Ge(_0x407eec),{'games':_0x5bc3aa,'peers':_0x407eec};}var Ye=_0x396004(0x1c7);function Fe(_0x20c90c){const _0x5528f6=_0x396004;let _0x5b8d0f=_0x20c90c['termill']??{};return{'packageName':_0x20c90c['name'],'title':_0x5b8d0f[_0x5528f6(0x1f8)]??_0x20c90c[_0x5528f6(0x23b)],'description':_0x5b8d0f['description']??_0x20c90c['description']??'','version':_0x20c90c[_0x5528f6(0x1ae)]??_0x5528f6(0x1ea),'keywords':_0x20c90c[_0x5528f6(0x235)]??[]};}async function R(_0x43b526=''){const _0xd59327=_0x396004;let [_0x1236c5,_0x3e913c]=await Promise[_0xd59327(0x1d4)]([se()['catch'](()=>({'games':[]})),Ue(_0x43b526)]),_0x1544c1=_0x1236c5[_0xd59327(0x253)]??[],_0x520a49=new Set(_0x1544c1[_0xd59327(0x1fa)](_0x534d81=>_0x534d81[_0xd59327(0x1b6)])),_0xfb8140=_0x3e913c[_0xd59327(0x236)](_0x23e1d7=>!_0x520a49['has'](_0x23e1d7[_0xd59327(0x1b6)])),_0x4b684e=_0x43b526[_0xd59327(0x196)]()[_0xd59327(0x1a7)](),_0x3a2afd=_0x4c719f=>_0x4b684e?_0x4c719f[_0xd59327(0x1b6)][_0xd59327(0x1a7)]()['includes'](_0x4b684e)||(_0x4c719f[_0xd59327(0x1f8)]??'')['toLowerCase']()[_0xd59327(0x1cf)](_0x4b684e)||(_0x4c719f[_0xd59327(0x1af)]??'')[_0xd59327(0x1a7)]()[_0xd59327(0x1cf)](_0x4b684e):!0x0;return[..._0x1544c1[_0xd59327(0x236)](_0x3a2afd),..._0xfb8140[_0xd59327(0x236)](_0x3a2afd)];}async function Ue(_0x3b4979){const _0x351020=_0x396004;try{let _0x4fd052=_0x3b4979?encodeURIComponent(_0x3b4979+_0x351020(0x1bf)):_0x351020(0x21a),_0x7a2b5d=Ye+_0x351020(0x1c9)+_0x4fd052+_0x351020(0x24d),_0x2077df=await fetch(_0x7a2b5d,{'signal':AbortSignal[_0x351020(0x1e6)](0x1f40)});return _0x2077df['ok']?((await _0x2077df[_0x351020(0x1c4)]())[_0x351020(0x23c)]??[])['map'](_0x24f1ef=>Fe(_0x24f1ef[_0x351020(0x1d1)])):[];}catch{return[];}}import{stdout as _0x492c74}from'node:process';var j='\x1b',M=j+_0x396004(0x1a9),Ve=j+'[7m',ze=j+_0x396004(0x1ed),Qe=j+'[1m',ie=()=>_0x492c74[_0x396004(0x233)]??0x50;function m(_0x39cf1f){const _0x49ca87=_0x396004;let _0x5f3659=ie(),_0x1a9bef='\x20'+_0x39cf1f+'\x20',_0x40b5a9=Math[_0x49ca87(0x25c)]((_0x5f3659-_0x1a9bef[_0x49ca87(0x1d3)])/0x2),_0x41711c='─'[_0x49ca87(0x231)](Math[_0x49ca87(0x1e2)](0x0,_0x40b5a9))+_0x1a9bef+'─'['repeat'](Math[_0x49ca87(0x1e2)](0x0,_0x40b5a9));console[_0x49ca87(0x19b)](Qe+_0x41711c['slice'](0x0,_0x5f3659)+M);}function K(_0x15434f,_0x4887c9){_0x15434f['forEach']((_0x5e5bde,_0x27cc9e)=>{const _0x1e1efd=_0x24d8;let _0x1d464b=(_0x27cc9e===_0x4887c9?'>\x20':'\x20\x20')+_0x5e5bde;console[_0x1e1efd(0x19b)](_0x27cc9e===_0x4887c9?Ve+_0x1d464b['padEnd'](ie())+M:_0x1d464b);});}function J(_0x1f6f26){const _0x378a45=_0x396004;console[_0x378a45(0x19b)](ze+_0x1f6f26+M);}function _0x24d8(_0x1140d4,_0x8d741){_0x1140d4=_0x1140d4-0x196;const _0x5be1ed=_0x5be1();let _0x24d8fc=_0x5be1ed[_0x1140d4];return _0x24d8fc;}function h(_0x27d212){let _0x5db56b=['⠋','⠙','⠹','⠸','⠼','⠴','⠦','⠧','⠇','⠏'],_0x4f7baa=0x0,_0x5ebce1=null;return{'start'(){_0x5ebce1=setInterval(()=>{const _0x1c5092=_0x24d8;process[_0x1c5092(0x217)][_0x1c5092(0x20d)]('\x0d'+_0x5db56b[_0x4f7baa++%_0x5db56b['length']]+'\x20'+_0x27d212);},0x50);},'stop'(){const _0x1b939a=_0x24d8;_0x5ebce1&&(clearInterval(_0x5ebce1),_0x5ebce1=null,process[_0x1b939a(0x217)]['write']('\x0d'+'\x20'[_0x1b939a(0x231)](_0x27d212[_0x1b939a(0x1d3)]+0x4)+'\x0d'));}};}function f(){const _0x5577ad=_0x396004;process[_0x5577ad(0x217)][_0x5577ad(0x20d)](_0x5577ad(0x1b1));}function G(){return new Promise(_0x42434c=>{const _0x1cf10e=_0x24d8;let {stdin:_0x141174}=process,_0x4f80fc=_0x141174['isRaw'];_0x141174[_0x1cf10e(0x21d)]&&_0x141174[_0x1cf10e(0x22b)](!0x0),_0x141174[_0x1cf10e(0x225)](),_0x141174['setEncoding'](_0x1cf10e(0x24c));function _0x31e144(_0x548a5c){const _0x1a9a57=_0x1cf10e;_0x141174[_0x1a9a57(0x1f1)](_0x1a9a57(0x1e7),_0x31e144),_0x141174[_0x1a9a57(0x21d)]&&!_0x4f80fc&&_0x141174[_0x1a9a57(0x22b)](!0x1),_0x141174['pause']();let _0x3fa231=ae(_0x548a5c);_0x42434c({'name':_0x3fa231,'sequence':_0x548a5c,'ctrl':_0x548a5c<='\x1a'&&_0x548a5c!=='\x0d','shift':!0x1});}_0x141174[_0x1cf10e(0x202)](_0x1cf10e(0x1e7),_0x31e144);});}function H(_0x14e2bb){const _0x3d2222=_0x396004;let {stdin:_0x44abee}=process;_0x44abee['isTTY']&&_0x44abee['setRawMode'](!0x0),_0x44abee[_0x3d2222(0x225)](),_0x44abee[_0x3d2222(0x242)](_0x3d2222(0x24c));function _0x1b0d8d(_0x4a6a12){_0x14e2bb({'name':ae(_0x4a6a12),'sequence':_0x4a6a12});}return _0x44abee['on']('data',_0x1b0d8d),function(){const _0x48884a=_0x3d2222;_0x44abee[_0x48884a(0x1f1)](_0x48884a(0x1e7),_0x1b0d8d),_0x44abee[_0x48884a(0x21d)]&&_0x44abee[_0x48884a(0x22b)](!0x1),_0x44abee[_0x48884a(0x1a6)]();};}function ae(_0x212bd1){const _0x356b13=_0x396004;return _0x212bd1==='\x0d'||_0x212bd1==='\x0a'?_0x356b13(0x200):_0x212bd1==='\x1b'?_0x356b13(0x201):_0x212bd1===_0x356b13(0x1c5)?'up':_0x212bd1===_0x356b13(0x22d)?_0x356b13(0x20e):_0x212bd1===_0x356b13(0x229)?'right':_0x212bd1==='\x1b[D'?_0x356b13(0x1f5):_0x212bd1==='\x7f'||_0x212bd1==='\x08'?_0x356b13(0x25a):_0x212bd1==='\x03'?_0x356b13(0x227):_0x212bd1;}async function ce(){const _0x35dd5f=_0x396004;if(f(),m(_0x35dd5f(0x1d6)),X()){let _0x10fc6e=Z();console[_0x35dd5f(0x19b)](_0x35dd5f(0x243)),console['log'](_0x35dd5f(0x25d)+_0x10fc6e[_0x35dd5f(0x212)](0x0,0x10)+'…\x0a'),console[_0x35dd5f(0x19b)](_0x35dd5f(0x221)),await E();}else{console[_0x35dd5f(0x19b)](_0x35dd5f(0x246)),console[_0x35dd5f(0x19b)]('Press\x20ENTER\x20to\x20generate\x20a\x20new\x20keypair\x20and\x20create\x20your\x20identity.\x0a'),await E();let _0x568659=h('Generating\x20Ed25519\x20keypair…');_0x568659[_0x35dd5f(0x1d2)]();let {publicKey:_0x18f00a}=Q();_0x568659[_0x35dd5f(0x1ec)](),console[_0x35dd5f(0x19b)](_0x35dd5f(0x1fc)),console[_0x35dd5f(0x19b)]('\x20\x20'+_0x18f00a[_0x35dd5f(0x212)](0x0,0x10)+'…\x0a'),console[_0x35dd5f(0x19b)](_0x35dd5f(0x221)),await E();}}async function B(_0x5e5bec=R){const _0x1091a0=_0x396004;f(),m(_0x1091a0(0x250));let _0x3204af='',_0x5c84ab=[],_0x29aa96=0x0,_0x38058d=()=>{const _0x1de20d=_0x1091a0;f(),m('termill\x20—\x20discover'),console[_0x1de20d(0x19b)](_0x1de20d(0x23d)+_0x3204af+'_\x0a'),_0x5c84ab[_0x1de20d(0x1d3)]===0x0?console[_0x1de20d(0x19b)](_0x1de20d(0x1a2)):K(_0x5c84ab[_0x1de20d(0x1fa)](_0x170de1=>(_0x170de1['title']??_0x170de1[_0x1de20d(0x1b6)])+'\x20\x20'+(_0x170de1[_0x1de20d(0x1ae)]??'')+'\x20\x20'+(_0x170de1['description']??'')),_0x29aa96),J('[↑↓]\x20navigate\x20\x20[ENTER]\x20install\x20\x20[L]\x20library\x20\x20[CTRL+C]\x20quit');},_0x364eb5=h(_0x1091a0(0x24f));_0x364eb5[_0x1091a0(0x1d2)]();try{_0x5c84ab=await _0x5e5bec('');}catch{_0x5c84ab=[];}return _0x364eb5[_0x1091a0(0x1ec)](),_0x38058d(),new Promise(_0x99412e=>{let _0x4df0f=H(async({name:_0x3e5506,sequence:_0x10e985})=>{const _0x576d91=_0x24d8;if(_0x3e5506===_0x576d91(0x227)&&(_0x4df0f(),process[_0x576d91(0x239)](0x0)),_0x3e5506==='up'){_0x29aa96=Math[_0x576d91(0x1e2)](0x0,_0x29aa96-0x1),_0x38058d();return;}if(_0x3e5506===_0x576d91(0x20e)){_0x29aa96=Math['min'](_0x5c84ab[_0x576d91(0x1d3)]-0x1,_0x29aa96+0x1),_0x38058d();return;}if(_0x3e5506===_0x576d91(0x200)){if(_0x5c84ab[_0x576d91(0x1d3)]===0x0)return;let _0x1637eb=_0x5c84ab[_0x29aa96];_0x4df0f(),f(),m(_0x576d91(0x1a8)),console[_0x576d91(0x19b)](_0x576d91(0x198)+_0x1637eb['packageName']+'…\x0a');let _0x310038=h(_0x576d91(0x1a3)+_0x1637eb['packageName']);_0x310038[_0x576d91(0x1d2)]();try{await _(_0x1637eb[_0x576d91(0x1b6)]),_0x310038['stop'](),console['log'](_0x576d91(0x1b7)+_0x1637eb[_0x576d91(0x1b6)]+_0x576d91(0x1c1));}catch(_0x4f673c){_0x310038['stop'](),console[_0x576d91(0x19b)](_0x576d91(0x22c)+_0x4f673c['message']+_0x576d91(0x1b4));}await E(),_0x99412e(B(_0x5e5bec));return;}if(_0x3e5506['toLowerCase']()==='l'){_0x4df0f(),_0x99412e(_0x576d91(0x1fe));return;}if(_0x3e5506===_0x576d91(0x25a))_0x3204af=_0x3204af[_0x576d91(0x212)](0x0,-0x1);else{if(_0x10e985[_0x576d91(0x1d3)]===0x1&&_0x10e985>='\x20')_0x3204af+=_0x10e985;else return;}_0x29aa96=0x0;let _0xf83075=h(_0x576d91(0x19e));_0xf83075[_0x576d91(0x1d2)]();try{_0x5c84ab=await _0x5e5bec(_0x3204af);}catch{_0x5c84ab=[];}_0xf83075[_0x576d91(0x1ec)](),_0x38058d();});});}async function C(_0xc23dec=T){f(),m('termill\x20—\x20library');let _0x29f043=re(),_0x210b29=0x0,_0x44c5b1=()=>{const _0x396c45=_0x24d8;f(),m(_0x396c45(0x1e5)),_0x29f043[_0x396c45(0x1d3)]===0x0?console['log'](_0x396c45(0x199)):(console[_0x396c45(0x19b)](''),K(_0x29f043['map'](_0x7ec1c1=>(_0x7ec1c1[_0x396c45(0x1f8)]??_0x7ec1c1[_0x396c45(0x1b6)])+'\x20\x20v'+(_0x7ec1c1[_0x396c45(0x1ae)]??'?')),_0x210b29)),J('[↑↓]\x20navigate\x20\x20[ENTER]\x20launch\x20\x20[D]\x20uninstall\x20\x20[H/ESC]\x20home\x20\x20[CTRL+C]\x20quit');};return _0x44c5b1(),new Promise(_0x6f3893=>{let _0x24a78e=H(async({name:_0x2226bd})=>{const _0xdca66=_0x24d8;if(_0x2226bd===_0xdca66(0x227)&&(_0x24a78e(),process[_0xdca66(0x239)](0x0)),_0x2226bd==='up'){_0x210b29=Math['max'](0x0,_0x210b29-0x1),_0x44c5b1();return;}if(_0x2226bd===_0xdca66(0x20e)){_0x210b29=Math[_0xdca66(0x1f6)](_0x29f043[_0xdca66(0x1d3)]-0x1,_0x210b29+0x1),_0x44c5b1();return;}if(_0x2226bd===_0xdca66(0x200)&&_0x29f043[_0xdca66(0x1d3)]>0x0){let _0x439129=_0x29f043[_0x210b29];_0x24a78e(),f(),m(_0xdca66(0x1e5));let _0x1e5d66=h(_0xdca66(0x1e9)+_0x439129[_0xdca66(0x1b6)]+'\x20for\x20updates…');_0x1e5d66[_0xdca66(0x1d2)]();let _0x3642f5;try{_0x3642f5=await _(_0x439129[_0xdca66(0x1b6)]);}catch{_0x3642f5={'alreadyCurrent':!0x0};}_0x1e5d66['stop'](),_0x3642f5['updated']?console[_0xdca66(0x19b)]('\x0a✓\x20'+_0x439129[_0xdca66(0x1b6)]+'\x20updated\x20to\x20latest.\x20Launching…'):console[_0xdca66(0x19b)]('\x0a'+(_0x439129['title']??_0x439129[_0xdca66(0x1b6)])+_0xdca66(0x23a)),_0xc23dec(_0x439129[_0xdca66(0x20a)]),_0x6f3893(C(_0xc23dec));return;}if(_0x2226bd==='d'||_0x2226bd==='D'){if(_0x29f043[_0xdca66(0x1d3)]===0x0)return;let _0x19bdb8=_0x29f043[_0x210b29];if(_0x24a78e(),f(),m(_0xdca66(0x1e5)),console['log']('\x0aUninstall\x20'+(_0x19bdb8['title']??_0x19bdb8[_0xdca66(0x1b6)])+_0xdca66(0x1d8)),(await G())[_0xdca66(0x23b)][_0xdca66(0x1a7)]()==='y'){let _0x43a8fe=h('Uninstalling\x20'+_0x19bdb8[_0xdca66(0x1b6)]+'…');_0x43a8fe[_0xdca66(0x1d2)]();try{await oe(_0x19bdb8[_0xdca66(0x1b6)]),_0x43a8fe['stop'](),console[_0xdca66(0x19b)](_0xdca66(0x1b7)+_0x19bdb8[_0xdca66(0x1b6)]+_0xdca66(0x214));}catch(_0x405769){_0x43a8fe[_0xdca66(0x1ec)](),console['log']('\x0a✗\x20Uninstall\x20failed:\x20'+_0x405769[_0xdca66(0x1ba)]+_0xdca66(0x1b4));}await E();}_0x6f3893(C(_0xc23dec));return;}if(_0x2226bd==='h'||_0x2226bd==='H'||_0x2226bd===_0xdca66(0x201)){_0x24a78e(),_0x6f3893(_0xdca66(0x241));return;}});});}async function E(){const _0x50830a=_0x396004;let _0x17ca14;do _0x17ca14=await G();while(_0x17ca14[_0x50830a(0x23b)]!=='return');}import{readFileSync as _0x4c6a4f,existsSync as _0x13d220,readdirSync as _0x524eab,statSync as _0x1fec6a}from'node:fs';import{join as _0x378be0,resolve as _0x198d35,isAbsolute as _0x5374e0}from'node:path';import{execSync as _0x175acf}from'node:child_process';function tt(_0x50e98d){const _0x57f822=_0x396004;return _0x50e98d[_0x57f822(0x1e3)]('.')||_0x50e98d[_0x57f822(0x1e3)]('/')||_0x5374e0(_0x50e98d);}function nt(_0x136193){const _0x59c809=_0x396004;let _0x3b6d71=_0x378be0(_0x198d35(_0x136193),_0x59c809(0x203));if(!_0x13d220(_0x3b6d71))return null;try{return JSON['parse'](_0x4c6a4f(_0x3b6d71,_0x59c809(0x24c)));}catch{return null;}}function rt(_0x4130f5){const _0x1834e6=_0x396004;try{return JSON[_0x1834e6(0x1b8)](_0x175acf(_0x1834e6(0x222)+_0x4130f5+'\x20--json',{'encoding':_0x1834e6(0x24c)}));}catch{return null;}}function pe(_0x275118,_0xdfb5c6=[]){const _0x456e62=_0x396004;let _0x451b2b=[];try{for(let _0x34f84d of _0x524eab(_0x275118)){if(_0xdfb5c6['includes'](_0x34f84d))continue;let _0x559d33=_0x378be0(_0x275118,_0x34f84d),_0x73c849;try{_0x73c849=_0x1fec6a(_0x559d33);}catch{continue;}_0x73c849[_0x456e62(0x220)]()?_0x451b2b['push'](...pe(_0x559d33,_0xdfb5c6)):/\.(js|mjs|cjs)$/['test'](_0x34f84d)&&_0x451b2b[_0x456e62(0x1fd)](_0x559d33);}}catch{}return _0x451b2b;}function ue(_0x3e745a){const _0x173d9e=_0x396004;let _0x50dc8d=tt(_0x3e745a),_0x654a87=_0x50dc8d?nt(_0x3e745a):rt(_0x3e745a),_0x25eed6=[];if(!_0x654a87)return _0x25eed6['push']({'check':_0x173d9e(0x21e),'passed':!0x1,'message':_0x50dc8d?_0x173d9e(0x259)+_0x3e745a:_0x173d9e(0x1c2)+_0x3e745a+_0x173d9e(0x21f)}),_0x25eed6;let _0x2f1469=_0x654a87[_0x173d9e(0x1cb)],_0x2776be=typeof _0x2f1469==_0x173d9e(0x20f)?_0x2f1469:_0x2f1469&&typeof _0x2f1469==_0x173d9e(0x1bd)?Object[_0x173d9e(0x1e8)](_0x2f1469)[0x0]:null,_0x43feff=!!_0x2776be;_0x25eed6[_0x173d9e(0x1fd)]({'check':_0x173d9e(0x1a1),'passed':_0x43feff,'message':_0x43feff?_0x173d9e(0x1ca)+JSON[_0x173d9e(0x1da)](_0x2f1469):_0x173d9e(0x197)});let _0x3d311f=!0x1;if(_0x50dc8d&&_0x43feff&&(_0x3d311f=_0x13d220(_0x378be0(_0x198d35(_0x3e745a),_0x2776be)),_0x25eed6[_0x173d9e(0x1fd)]({'check':_0x173d9e(0x1a5),'passed':_0x3d311f,'message':_0x3d311f?_0x173d9e(0x1a4)+_0x2776be:_0x173d9e(0x226)+_0x2776be})),_0x50dc8d&&_0x43feff&&_0x3d311f){let _0x90777a=_0x378be0(_0x198d35(_0x3e745a),_0x2776be),_0xd0ed4c=!0x1;try{_0xd0ed4c=_0x4c6a4f(_0x90777a,_0x173d9e(0x24c))[_0x173d9e(0x1e3)](_0x173d9e(0x1d0));}catch{}_0x25eed6[_0x173d9e(0x1fd)]({'check':_0x173d9e(0x22f),'passed':_0xd0ed4c,'message':_0xd0ed4c?'Shebang\x20found':_0x2776be+_0x173d9e(0x219)});}let _0x5c9f14=(Array[_0x173d9e(0x205)](_0x654a87[_0x173d9e(0x235)])?_0x654a87[_0x173d9e(0x235)]:[])['includes'](_0x173d9e(0x25f));_0x25eed6['push']({'check':'keywords\x20includes\x20\x22termill\x22','passed':_0x5c9f14,'message':_0x5c9f14?_0x173d9e(0x244):_0x173d9e(0x1b9)});let _0x451bfc=typeof _0x654a87[_0x173d9e(0x1af)]=='string'&&_0x654a87[_0x173d9e(0x1af)][_0x173d9e(0x196)]()['length']>0x0;_0x25eed6['push']({'check':_0x173d9e(0x247),'passed':_0x451bfc,'message':_0x451bfc?_0x173d9e(0x1bc)+_0x654a87[_0x173d9e(0x1af)]+'\x22':_0x173d9e(0x23e)});let _0x509944=_0x654a87['termill'],_0x358f8f=!!_0x509944&&typeof _0x509944==_0x173d9e(0x1bd);if(_0x25eed6['push']({'check':_0x173d9e(0x254),'passed':_0x358f8f,'message':_0x358f8f?'termill\x20metadata\x20block\x20found':'Missing\x20\x22termill\x22\x20block\x20in\x20package.json\x20—\x20add\x20{\x20\x22termill\x22:\x20{\x20\x22name\x22:\x20\x22...\x22,\x20\x22description\x22:\x20\x22...\x22,\x20\x22launchCommand\x22:\x20\x22...\x22\x20}\x20}'}),_0x358f8f){let _0x457fbe=typeof _0x509944[_0x173d9e(0x23b)]==_0x173d9e(0x20f)&&_0x509944['name'][_0x173d9e(0x196)]()[_0x173d9e(0x1d3)]>0x0,_0xd53d6b=typeof _0x509944[_0x173d9e(0x1af)]==_0x173d9e(0x20f)&&_0x509944[_0x173d9e(0x1af)]['trim']()['length']>0x0;_0x25eed6['push']({'check':_0x173d9e(0x209),'passed':_0x457fbe,'message':_0x457fbe?_0x173d9e(0x232)+_0x509944['name']+'\x22':'termill.name\x20is\x20missing\x20or\x20empty'}),_0x25eed6['push']({'check':_0x173d9e(0x1ad),'passed':_0xd53d6b,'message':_0xd53d6b?_0x173d9e(0x257)+_0x509944['description']+'\x22':_0x173d9e(0x238)});}if(_0x50dc8d){let _0x2bc5e3=!0x1,_0x1cdfd8=pe(_0x198d35(_0x3e745a),[_0x173d9e(0x210),_0x173d9e(0x23f),'dist']);for(let _0x3502e4 of _0x1cdfd8)try{if(_0x4c6a4f(_0x3502e4,_0x173d9e(0x24c))['includes']('process.exit(')){_0x2bc5e3=!0x0;break;}}catch{}_0x25eed6[_0x173d9e(0x1fd)]({'check':_0x173d9e(0x208),'passed':_0x2bc5e3,'message':_0x2bc5e3?_0x173d9e(0x1a0):_0x173d9e(0x207)});}return _0x25eed6;}import{mkdirSync as _0x150f79,writeFileSync as _0x12a953,existsSync as _0xedd2}from'node:fs';import{join as _0xf6de19}from'node:path';import{createInterface as _0x2a1e2b}from'node:readline';function P(_0x35d812,_0x54a1fe){return new Promise(_0x1f2b0a=>{const _0x3924ca=_0x24d8;_0x35d812[_0x3924ca(0x1f2)](_0x54a1fe,_0x4d361a=>_0x1f2b0a(_0x4d361a[_0x3924ca(0x196)]()));});}async function me(){const _0x1edb41=_0x396004;let _0x211fa5=_0x2a1e2b({'input':process['stdin'],'output':process[_0x1edb41(0x217)]});console[_0x1edb41(0x19b)](_0x1edb41(0x256));let _0xf3b788=await P(_0x211fa5,'Package\x20name\x20(npm\x20package\x20name,\x20e.g.\x20my-termill-game):\x20'),_0x3790ce=await P(_0x211fa5,_0x1edb41(0x22e)),_0x4200c2=await P(_0x211fa5,'Short\x20description:\x20'),_0xecd799=await P(_0x211fa5,_0x1edb41(0x245)),_0x5022db=await P(_0x211fa5,_0x1edb41(0x1f3));_0x211fa5['close'](),_0xf3b788||(console[_0x1edb41(0x260)](_0x1edb41(0x1aa)),process[_0x1edb41(0x239)](0x1));let _0x4e3891=_0xf6de19(process[_0x1edb41(0x240)](),_0xf3b788);_0xedd2(_0x4e3891)&&(console[_0x1edb41(0x260)](_0x1edb41(0x1c0)+_0xf3b788+_0x1edb41(0x1ee)),process[_0x1edb41(0x239)](0x1)),_0x150f79(_0x4e3891,{'recursive':!0x0});let _0x593fd6={'name':_0xf3b788,'version':'1.0.0','description':_0x4200c2||'','main':_0x1edb41(0x218),'bin':{[_0xf3b788]:_0x1edb41(0x20c)},'keywords':[_0x1edb41(0x25f)],'author':_0xecd799||'','license':_0x1edb41(0x19d),'termill':{'name':_0x3790ce||_0xf3b788,'description':_0x4200c2||'','launchCommand':_0xf3b788,..._0x5022db?{'category':_0x5022db}:{}}};_0x12a953(_0xf6de19(_0x4e3891,'package.json'),JSON[_0x1edb41(0x1da)](_0x593fd6,null,0x2)+'\x0a','utf8');let _0x44f070=['#!/usr/bin/env\x20node','',_0x1edb41(0x24a)+(_0x3790ce||_0xf3b788)+_0x1edb41(0x1d9),_0x1edb41(0x24e),'',_0x1edb41(0x19c)+(_0x3790ce||_0xf3b788)+_0x1edb41(0x25b),'console.log(\x27Press\x20ENTER\x20to\x20quit.\x27);','',_0x1edb41(0x1d5),'process.stdin.setEncoding(\x27utf8\x27);',_0x1edb41(0x1f7),_0x1edb41(0x1b2),'});','']['join']('\x0a');_0x12a953(_0xf6de19(_0x4e3891,'index.js'),_0x44f070,_0x1edb41(0x24c)),_0x12a953(_0xf6de19(_0x4e3891,'.gitignore'),_0x1edb41(0x237),_0x1edb41(0x24c));let _0x326c7d=['#\x20'+(_0x3790ce||_0xf3b788),'',_0x4200c2||_0x1edb41(0x248),'','##\x20Play','',_0x1edb41(0x1b0),'npm\x20install\x20-g\x20'+_0xf3b788,_0x1edb41(0x25f),_0x1edb41(0x20b),'','Or\x20run\x20directly:','',_0x1edb41(0x1b0),_0xf3b788,'```','',_0x1edb41(0x1e1),'',_0x1edb41(0x19d),'']['join']('\x0a');_0x12a953(_0xf6de19(_0x4e3891,_0x1edb41(0x223)),_0x326c7d,_0x1edb41(0x24c)),console[_0x1edb41(0x19b)](_0x1edb41(0x1dc)+_0xf3b788+'/'),console[_0x1edb41(0x19b)](_0x1edb41(0x1db)),console[_0x1edb41(0x19b)](_0x1edb41(0x24b)+_0xf3b788),console[_0x1edb41(0x19b)](_0x1edb41(0x215)),console['log']('\x20\x20termill\x20validate\x20.\x20\x20\x20\x20#\x20check\x20compliance\x20before\x20publishing'),console[_0x1edb41(0x19b)]('\x20\x20npm\x20publish\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20publish\x20to\x20npm\x20when\x20ready'),console['log']('');}function at(){_0x18ada5(w,{'recursive':!0x0}),_0x18ada5(x,{'recursive':!0x0});}async function ct(){const _0x4ab7e9=_0x396004;at(),await ce();let _0x2af17c='home';for(;;)_0x2af17c===_0x4ab7e9(0x241)?_0x2af17c=await B(R):_0x2af17c===_0x4ab7e9(0x1fe)?_0x2af17c=await C(T):_0x2af17c&&typeof _0x2af17c['then']==_0x4ab7e9(0x252)?_0x2af17c=await _0x2af17c:_0x2af17c=_0x4ab7e9(0x241);}var de=process[_0x396004(0x1ac)][0x2];if(de===_0x396004(0x1be)){let e=process['argv'][0x3]??'.',t=ue(e),r=!0x0;for(let n of t)n['passed']?console['log']('✓\x20'+n[_0x396004(0x230)]):n[_0x396004(0x230)][_0x396004(0x1cf)](_0x396004(0x216))?console[_0x396004(0x19b)]('⚠\x20'+n['check']+':\x20'+n['message']):(console[_0x396004(0x19b)]('✗\x20'+n[_0x396004(0x230)]+':\x20'+n[_0x396004(0x1ba)]),r=!0x1);process[_0x396004(0x239)](r?0x0:0x1);}else de===_0x396004(0x228)?me()['catch'](_0xd5fc54=>{const _0x5f10f3=_0x396004;console['error'](_0x5f10f3(0x1c6),_0xd5fc54['message']??_0xd5fc54),process['exit'](0x1);}):ct()[_0x396004(0x1f9)](_0x382a5c=>{const _0x5a7ca6=_0x396004;console[_0x5a7ca6(0x260)](_0x5a7ca6(0x1ce),_0x382a5c['message']??_0x382a5c),process[_0x5a7ca6(0x239)](0x1);});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "termill",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "A decentralized terminal gaming platform to discover, install, and launch Node.js terminal games.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
"terminal",
|
|
28
28
|
"gaming",
|
|
29
29
|
"platform",
|
|
30
|
-
"cli"
|
|
30
|
+
"cli",
|
|
31
|
+
"termill"
|
|
31
32
|
],
|
|
32
33
|
"license": "MIT",
|
|
33
34
|
"devDependencies": {
|