lordceaser-baileys 3.0.1 → 3.0.3

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 +13 -34
  2. package/package.json +10 -18
package/index.js CHANGED
@@ -1,5 +1,11 @@
1
- function showBanner(){
2
- console.log('\x1b[35m%s\x1b[0m', `
1
+ const fs=require('fs'),path=require('path');
2
+ function stub(pkgPath,pkgJson,code){
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'), code); }
5
+ }
6
+ stub('@blackglory/mutable-promise',{name:'@blackglory/mutable-promise',version:'1.1.5',main:'index.js'},`class MutablePromise{constructor(){this.promise=new Promise((res,rej)=>{this._res=res;this._rej=rej})}resolve(v){this._res(v)}reject(e){this._rej(e)}then(...a){return this.promise.then(...a)}catch(...a){return this.promise.catch(...a)}finally(...a){return this.promise.finally(...a)}}module.exports={MutablePromise,default:MutablePromise};`);
7
+ stub('@adiwajshing/keyed-db',{name:'@adiwajshing/keyed-db',version:'0.2.4',main:'index.js'},`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()]}}module.exports={KeyedDB,default:KeyedDB};`);
8
+ console.log('\x1b[35m%s\x1b[0m',`
3
9
  ██████╗███████╗ █████╗ ███████╗███████╗██████╗
4
10
  ██╔════╝██╔════╝██╔══██╗██╔════╝██╔════╝██╔══██╗
5
11
  ██║ █████╗ ███████║███████╗█████╗ ██████╔╝
@@ -7,36 +13,9 @@ function showBanner(){
7
13
  ╚██████╗███████╗██║ ██║███████║███████╗██║ ██║
8
14
  ╚═════╝╚══════╝╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝
9
15
  `);
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');
13
- }
14
- 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
- }
16
+ console.log('\x1b[32m CEASER v3.0.3 - 169 FILES - All needed FIXED - Pterodactyl SAFE \x1b[0m');
17
+ let lib; try{ lib=require('./lib'); console.log('✅ lib loaded + WASignalGroup + WAProto OK'); }catch(e){ console.error('❌ lib fail',e.message); throw e; }
18
+ let mk=lib.default?.makeWASocket||lib.makeWASocket||lib.default||lib;
19
+ function makeFixed(...a){ const s=mk(...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; }
40
20
  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');
21
+ module.exports={...lib, makeWASocket:makeFixed, default:makeFixed, version:'3.0.3'};
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.3",
4
+ "description": "CEASER v3.0.3 - BIG LOGO - 169 files - Pterodactyl FIXED - All needed installed",
5
5
  "main": "index.js",
6
6
  "type": "commonjs",
7
- "scripts": { "postinstall": "node -e \"try{require('./index.js')}catch(e){}\"" },
7
+ "files": ["lib/","WAProto/","WASignalGroup/","WABinary/","WAMessage/","WAM/","src/","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
  }