lordceaser-baileys 3.0.1 → 3.0.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/index.js CHANGED
@@ -1,3 +1,18 @@
1
+ const fs=require('fs'),path=require('path');
2
+ function ensureStub(pkgPath, pkgJson, indexJs){
3
+ const full=path.join(__dirname,'node_modules',pkgPath);
4
+ if(!fs.existsSync(full)){ fs.mkdirSync(full,{recursive:true}); fs.writeFileSync(path.join(full,'package.json'), JSON.stringify(pkgJson)); fs.writeFileSync(path.join(full,'index.js'), indexJs); console.log(`✅ Stub created ${pkgPath}`); }
5
+ }
6
+ // Stub @blackglory/mutable-promise (404 on Pterodactyl)
7
+ ensureStub('@blackglory/mutable-promise', {name:'@blackglory/mutable-promise',version:'1.1.5',main:'index.js'}, `
8
+ class MutablePromise{constructor(){this._state='pending';this._value=undefined;this.promise=new Promise((res,rej)=>{this._resolve=(v)=>{this._state='fulfilled';this._value=v;res(v)};this._reject=(e)=>{this._state='rejected';this._value=e;rej(e)}})};resolve(v){this._resolve(v)};reject(e){this._reject(e)};then(...a){return this.promise.then(...a)};catch(...a){return this.promise.catch(...a)};finally(...a){return this.promise.finally(...a)}}
9
+ module.exports={MutablePromise,default:MutablePromise};
10
+ `);
11
+ // Stub @adiwajshing/keyed-db (can also 404)
12
+ ensureStub('@adiwajshing/keyed-db', {name:'@adiwajshing/keyed-db',version:'0.2.4',main:'index.js'}, `
13
+ class KeyedDB{constructor(){this.map=new Map()}get(k){return this.map.get(k)}set(k,v){this.map.set(k,v)}delete(k){this.map.delete(k)}clear(){this.map.clear()}values(){return [...this.map.values()]}keys(){return [...this.map.keys()]}}
14
+ module.exports={KeyedDB,default:KeyedDB};
15
+ `);
1
16
  function showBanner(){
2
17
  console.log('\x1b[35m%s\x1b[0m', `
3
18
  ██████╗███████╗ █████╗ ███████╗███████╗██████╗
@@ -7,36 +22,12 @@ function showBanner(){
7
22
  ╚██████╗███████╗██║ ██║███████║███████╗██║ ██║
8
23
  ╚═════╝╚══════╝╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝
9
24
  `);
10
- console.log('\x1b[36m%s\x1b[0m', ' ⚡ CEASER v3.0.1 - BIG LOGO - 169 FILES - PAIRING FIXED CEASERMD - PTERODACTYL SAFE ⚡');
11
- console.log('\x1b[32m%s\x1b[0m', ' ✅ Pterodactyl FIXED • cache-manager FIXED • Pairing FIXED • 169 files CJS');
12
- console.log('\x1b[33m%s\x1b[0m', ' 🔑 Custom: CEASERMD -> CEAS-ERMD WORKS! • Buttons FIXED • gstatus FIXED');
25
+ console.log('\x1b[32m CEASER v3.0.2 - BIG LOGO - 169 FILES - cache-manager FIXED - PTERODACTYL FIXED \x1b[0m');
26
+ console.log('\x1b[33m 🔑 Custom: CEASERMD -> CEAS-ERMD WORKS! \x1b[0m');
13
27
  }
14
28
  showBanner();
15
- let lib;
16
- try{ lib=require('./lib'); console.log('\x1b[32m%s\x1b[0m', '✅ CEASER v3.0.1 lib loaded - 169 files - cache-manager included'); }catch(e){ console.error('❌ lib/ missing', e.message); throw e; }
17
- let makeWASocketLib;
18
- try{
19
- if(lib.default && lib.default.makeWASocket) makeWASocketLib=lib.default.makeWASocket;
20
- else if(lib.makeWASocket) makeWASocketLib=lib.makeWASocket;
21
- else if(lib.default) makeWASocketLib=lib.default;
22
- else makeWASocketLib=lib;
23
- }catch(e){ makeWASocketLib=lib.default || lib.makeWASocket || lib; }
24
- function makeFixed(...a){
25
- const s=makeWASocketLib(...a);
26
- if(s && s.requestPairingCode){
27
- const orig=s.requestPairingCode.bind(s);
28
- s.requestPairingCode=async(phone,custom)=>{
29
- phone=phone.replace(/\D/g,'');
30
- if(custom){
31
- custom=custom.toUpperCase().replace(/[^A-Z0-9]/g,'').substring(0,8);
32
- if(custom.length===8){ try{ const c=await orig(phone,custom); return c; }catch(e){} }
33
- }
34
- const c=await orig(phone);
35
- return c;
36
- };
37
- }
38
- return s;
39
- }
29
+ let lib; try{ lib=require('./lib'); }catch(e){ console.error('lib/ missing', e.message); throw e; }
30
+ let makeWASocketLib = lib.default?.makeWASocket || lib.makeWASocket || lib.default || lib;
31
+ function makeFixed(...a){ const s=makeWASocketLib(...a); if(s?.requestPairingCode){ const orig=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 orig(p,c); }catch{} } } return await orig(p); }; } return s; }
40
32
  if(lib.default) lib.default=makeFixed; if(lib.makeWASocket) lib.makeWASocket=makeFixed;
41
- module.exports={...lib, makeWASocket:makeFixed, default:makeFixed, makeCeaserWASocket:makeFixed, version:'3.0.1', CeaserVersion:'3.0.1'};
42
- console.log('\x1b[32m%s\x1b[0m', '✅ CEASER v3.0.1 loaded - CEASERMD + Buttons + gstatus');
33
+ module.exports={...lib, makeWASocket:makeFixed, default:makeFixed, version:'3.0.2'};
package/package.json CHANGED
@@ -1,37 +1,29 @@
1
1
  {
2
2
  "name": "lordceaser-baileys",
3
- "version": "3.0.1",
4
- "description": "CEASER v3.0.1 - BIG LOGO - 169 files CJS - Pairing FIXED CEASERMD - Pterodactyl FIXED - cache-manager FIXED",
3
+ "version": "3.0.2",
4
+ "description": "CEASER v3.0.2 - BIG LOGO - 169 files - cache-manager FIXED - Pterodactyl FIXED - CEASERMD",
5
5
  "main": "index.js",
6
6
  "type": "commonjs",
7
- "scripts": { "postinstall": "node -e \"try{require('./index.js')}catch(e){}\"" },
7
+ "files": ["lib/","WAProto/","WABinary/","WASignalGroup/","index.js"],
8
8
  "dependencies": {
9
- "@hapi/boom": "^9.1.4",
10
- "@blackglory/mutable-promise": "^1.1.5",
11
- "@adiwajshing/keyed-db": "^0.2.4",
12
- "async-lock": "^1.4.1",
13
- "async-mutex": "^0.4.0",
14
9
  "axios": "^1.6.0",
15
10
  "ws": "^8.14.2",
16
11
  "pino": "^8.17.2",
17
12
  "protobufjs": "^7.2.5",
18
13
  "qrcode-terminal": "^0.12.0",
19
- "libsignal": "^2.0.1",
20
- "futoin-hkdf": "^1.5.1",
21
14
  "jimp": "^0.22.10",
22
- "lru-cache": "^7.18.3",
23
15
  "file-type": "^16.5.4",
24
16
  "node-cache": "^5.1.2",
25
- "uuid": "^11.0.0",
17
+ "uuid": "^9.0.0",
26
18
  "long": "^5.2.3",
27
- "p-queue": "^6.6.2",
28
- "music-metadata": "^7.14.0",
29
19
  "lodash": "^4.17.21",
30
- "mysql2": "^3.9.7",
31
20
  "fflate": "^0.8.2",
32
21
  "cache-manager": "^5.3.2",
33
22
  "keyv": "^4.5.4",
34
- "libphonenumber-js": "^1.10.54"
35
- },
36
- "files": ["lib/","WAProto/","WABinary/","WASignalGroup/","WAMessage/","WAM/","index.js"]
23
+ "libphonenumber-js": "^1.10.54",
24
+ "libsignal": "^2.0.1",
25
+ "futoin-hkdf": "^1.5.1",
26
+ "lru-cache": "^7.18.3",
27
+ "music-metadata": "^7.14.0"
28
+ }
37
29
  }