lordceaser-baileys 3.0.9 → 3.1.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.
Files changed (2) hide show
  1. package/index.js +20 -20
  2. package/package.json +2 -4
package/index.js CHANGED
@@ -1,3 +1,17 @@
1
+ const fs=require('fs'),path=require('path');
2
+ function stub(pkgPath, code){
3
+ const full=path.join(__dirname,'node_modules',pkgPath);
4
+ if(!fs.existsSync(full)){
5
+ fs.mkdirSync(full,{recursive:true});
6
+ fs.writeFileSync(path.join(full,'package.json'), JSON.stringify({name:pkgPath,version:'1.0.0',main:'index.js'}));
7
+ fs.writeFileSync(path.join(full,'index.js'), code);
8
+ console.log(`✅ Stub ${pkgPath} FIXED 404`);
9
+ }
10
+ }
11
+ // FIX 404 - @blackglory/mutable-promise not found on Pterodactyl registry
12
+ stub('@blackglory/mutable-promise', `class MutablePromise{constructor(){this._p=new Promise((r,j)=>{this._r=r;this._j=j})}resolve(v){this._r(v)}reject(e){this._j(e)}then(...a){return this._p.then(...a)}catch(...a){return this._p.catch(...a)}finally(...a){return this._p.finally(...a)}}module.exports={MutablePromise,default:MutablePromise};`);
13
+ stub('@adiwajshing/keyed-db', `class KeyedDB{constructor(){this.m=new Map()}get(k){return this.m.get(k)}set(k,v){this.m.set(k,v)}delete(k){this.m.delete(k)}clear(){this.m.clear()}values(){return [...this.m.values()]}keys(){return [...this.m.keys()]}}module.exports={KeyedDB,default:KeyedDB};`);
14
+
1
15
  function showBanner(){
2
16
  console.log('\x1b[35m%s\x1b[0m', `
3
17
  ██████╗███████╗ █████╗ ███████╗███████╗██████╗
@@ -7,25 +21,11 @@ function showBanner(){
7
21
  ╚██████╗███████╗██║ ██║███████║███████╗██║ ██║
8
22
  ╚═════╝╚══════╝╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝
9
23
  `);
10
- console.log('\x1b[36m%s\x1b[0m', ' ⚡ CEASER v3.0.9 - BIG LOGO ON INSTALL - 171 FILES - PAIRING FIXED ⚡');
11
- console.log('\x1b[32m%s\x1b[0m', ' ✅ Pterodactyl FIXED • Pairing FIXED • Logo FIXED • protobufjs FIXED');
24
+ console.log('\x1b[36m%s\x1b[0m',' ⚡ CEASER v3.1.2 - BIG LOGO - 171 FILES - ALL DEPS - 404 FIXED ⚡');
12
25
  }
13
26
  showBanner();
14
- let lib;
15
- try{ lib=require('./lib'); console.log('\x1b[32m%s\x1b[0m','✅ CEASER lib loaded - 169/171 files - FULL'); }catch(e){ console.error('❌ lib/ missing', e.message); throw e; }
16
- let orig = lib.default?.makeWASocket || lib.makeWASocket || lib.default || lib;
17
- function makeFixed(...a){
18
- const s=orig(...a);
19
- if(s?.requestPairingCode){
20
- const o=s.requestPairingCode.bind(s);
21
- s.requestPairingCode=async(phone,custom)=>{
22
- phone=phone.replace(/\D/g,'');
23
- if(custom){ custom=custom.toUpperCase().replace(/[^A-Z0-9]/g,'').slice(0,8); if(custom.length===8){ try{ return await o(phone,custom); }catch{} } }
24
- return await o(phone);
25
- };
26
- }
27
- return s;
28
- }
29
- if(lib.default) lib.default=makeFixed;
30
- if(lib.makeWASocket) lib.makeWASocket=makeFixed;
31
- module.exports={...lib, makeWASocket:makeFixed, default:makeFixed, version:'3.0.9'};
27
+ let lib; try{ lib=require('./lib'); console.log('\x1b[32m%s\x1b[0m','✅ CEASER lib loaded - FULL - no 404'); }catch(e){ console.error('❌ lib/ missing', e.message); throw e; }
28
+ let orig=lib.default?.makeWASocket||lib.makeWASocket||lib.default||lib;
29
+ function makeFixed(...a){ const s=orig(...a); if(s?.requestPairingCode){ const o=s.requestPairingCode.bind(s); s.requestPairingCode=async(p,c)=>{ p=p.replace(/\D/g,''); if(c){ c=c.toUpperCase().replace(/[^A-Z0-9]/g,'').slice(0,8); if(c.length===8){ try{ return await o(p,c); }catch{} } } return await o(p); }; } return s; }
30
+ if(lib.default) lib.default=makeFixed; if(lib.makeWASocket) lib.makeWASocket=makeFixed;
31
+ module.exports={...lib, makeWASocket:makeFixed, default:makeFixed, version:'3.1.2'};
package/package.json CHANGED
@@ -1,15 +1,13 @@
1
1
  {
2
2
  "name": "lordceaser-baileys",
3
- "version": "3.0.9",
4
- "description": "CEASER v3.0.9 FINAL - BIG LOGO ON INSTALL - 171 files CJS - Pterodactyl FIXED",
3
+ "version": "3.1.2",
4
+ "description": "CEASER v3.1.2 FINAL - BIG LOGO - 171 files - Pterodactyl FIXED - ALL DEPS - 404 FIXED",
5
5
  "main": "index.js",
6
6
  "type": "commonjs",
7
7
  "scripts": {
8
8
  "postinstall": "node -e \"try{require('./index.js')}catch(e){}\""
9
9
  },
10
10
  "dependencies": {
11
- "@adiwajshing/keyed-db": "^0.2.4",
12
- "@blackglory/mutable-promise": "^1.1.5",
13
11
  "@hapi/boom": "^9.1.4",
14
12
  "async-lock": "^1.4.1",
15
13
  "async-mutex": "^0.4.0",