rafashacode.id 1.0.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 -0
- package/index.js +41 -0
- package/package.json +11 -0
package/README.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# rafashacode.id
|
|
2
|
+
|
|
3
|
+
Wrapper package untuk `@whiskeysockets/baileys`:
|
|
4
|
+
|
|
5
|
+
- Print banner ASCII sekali saat `require()`
|
|
6
|
+
- Re-export semua API dari Baileys upstream
|
|
7
|
+
|
|
8
|
+
Env:
|
|
9
|
+
|
|
10
|
+
- `RAFASHACODEID_BANNER=0` untuk mematikan banner
|
|
11
|
+
- `RAFASHACODEID_LINK="t.me/username"` untuk ganti link (tanpa republish)
|
|
12
|
+
- `RAFASHACODEID_ASCII="...\\n..."` untuk ganti seluruh banner (tanpa republish)
|
package/index.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const chalk = require('chalk');
|
|
2
|
+
|
|
3
|
+
function getBannerText() {
|
|
4
|
+
if (process.env.RAFASHACODEID_ASCII) return process.env.RAFASHACODEID_ASCII;
|
|
5
|
+
|
|
6
|
+
const link = process.env.RAFASHACODEID_LINK || 't.me/rafashaalfian';
|
|
7
|
+
|
|
8
|
+
const cols = process.stdout.columns || 80;
|
|
9
|
+
const isSmallTerminal = cols < 90;
|
|
10
|
+
|
|
11
|
+
const bigAscii =
|
|
12
|
+
`██████╗ █████╗ ███████╗ █████╗ ███████╗██╗ ██╗ █████╗ \n` +
|
|
13
|
+
`██╔══██╗██╔══██╗██╔════╝██╔══██╗██╔════╝██║ ██║██╔══██╗\n` +
|
|
14
|
+
`██████╔╝███████║█████╗ ███████║███████╗███████║███████║\n` +
|
|
15
|
+
`██╔══██╗██╔══██║██╔══╝ ██╔══██║╚════██║██╔══██║██╔══██║\n` +
|
|
16
|
+
`██║ ██║██║ ██║██║ ██║ ██║███████║██║ ██║██║ ██║\n` +
|
|
17
|
+
`╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝`;
|
|
18
|
+
|
|
19
|
+
const smallAscii =
|
|
20
|
+
` ▗▀▖ ▌ \n` +
|
|
21
|
+
`▙▀▖▝▀▖▐ ▝▀▖▞▀▘▛▀▖▝▀▖\n` +
|
|
22
|
+
`▌ ▞▀▌▜▀ ▞▀▌▝▀▖▌ ▌▞▀▌\n` +
|
|
23
|
+
`▘ ▝▀▘▐ ▝▀▘▀▀ ▘ ▘▝▀▘`;
|
|
24
|
+
|
|
25
|
+
const ascii = isSmallTerminal ? smallAscii : bigAscii;
|
|
26
|
+
|
|
27
|
+
return { ascii, link };
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (
|
|
31
|
+
!global.__RAFASHACODEID_BANNER_PRINTED__ &&
|
|
32
|
+
process.env.RAFASHACODEID_BANNER !== '0'
|
|
33
|
+
) {
|
|
34
|
+
global.__RAFASHACODEID_BANNER_PRINTED__ = true;
|
|
35
|
+
|
|
36
|
+
const { ascii, link } = getBannerText();
|
|
37
|
+
console.log(chalk.hex('#00FFD5')(ascii));
|
|
38
|
+
console.log(chalk.red(link));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
module.exports = require('baileys-upstream');
|
package/package.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rafashacode.id",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "RafaShaCodeID wrapper for Baileys (prints banner + re-exports upstream)",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"baileys-upstream": "npm:@whiskeysockets/baileys@^6.7.21",
|
|
9
|
+
"chalk": "^4.1.2"
|
|
10
|
+
}
|
|
11
|
+
}
|