@dongdev/fca-unofficial 4.0.1 → 4.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/dist/index.js +4 -71
- package/dist/index.mjs +4 -71
- package/fca-config.example.json +1 -1
- package/package.json +1 -2
package/dist/index.js
CHANGED
|
@@ -65,8 +65,7 @@ function makeStyles(theme) {
|
|
|
65
65
|
info: (v) => import_picocolors.default.cyan(v),
|
|
66
66
|
warn: (v) => import_picocolors.default.yellow(v),
|
|
67
67
|
error: (v) => import_picocolors.default.red(v),
|
|
68
|
-
sys: (v) => import_picocolors.default.blue(v)
|
|
69
|
-
banner: (v) => import_picocolors.default.white(v)
|
|
68
|
+
sys: (v) => import_picocolors.default.blue(v)
|
|
70
69
|
};
|
|
71
70
|
}
|
|
72
71
|
return {
|
|
@@ -75,8 +74,7 @@ function makeStyles(theme) {
|
|
|
75
74
|
info: (v) => import_picocolors.default.cyan(v),
|
|
76
75
|
warn: (v) => import_picocolors.default.yellow(v),
|
|
77
76
|
error: (v) => import_picocolors.default.red(v),
|
|
78
|
-
sys: (v) => import_picocolors.default.blue(v)
|
|
79
|
-
banner: (v) => import_picocolors.default.cyan(v)
|
|
77
|
+
sys: (v) => import_picocolors.default.blue(v)
|
|
80
78
|
};
|
|
81
79
|
}
|
|
82
80
|
function parseLabel(message, fallback) {
|
|
@@ -109,22 +107,7 @@ function formatSuccessBody(body, grad, fallbackPaint) {
|
|
|
109
107
|
}
|
|
110
108
|
return fallbackPaint(body);
|
|
111
109
|
}
|
|
112
|
-
function donixAsciiBlock() {
|
|
113
|
-
return [
|
|
114
|
-
"____ ____ ____ ____ ____",
|
|
115
|
-
"||D ||||O ||||N ||||I ||||X ||",
|
|
116
|
-
"||__||||__||||__||||__||||__||",
|
|
117
|
-
"|/__\\||/__\\||/__\\||/__\\||/__\\|"
|
|
118
|
-
].join("\n");
|
|
119
|
-
}
|
|
120
110
|
async function ensureUiLibs() {
|
|
121
|
-
if (!boxenLib) {
|
|
122
|
-
try {
|
|
123
|
-
const boxenMod = await import("boxen");
|
|
124
|
-
boxenLib = boxenMod.default ?? boxenMod;
|
|
125
|
-
} catch {
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
111
|
if (!oraFactory) {
|
|
129
112
|
try {
|
|
130
113
|
const oraMod = await import("ora");
|
|
@@ -141,51 +124,6 @@ async function ensureUiLibs() {
|
|
|
141
124
|
}
|
|
142
125
|
}
|
|
143
126
|
}
|
|
144
|
-
function printBootBanner(styles) {
|
|
145
|
-
if (didPrintBootBanner) return;
|
|
146
|
-
didPrintBootBanner = true;
|
|
147
|
-
const version = process.env.npm_package_version || "4.0.1";
|
|
148
|
-
const theme = getTheme();
|
|
149
|
-
const grad = theme === "cyberpunk" ? loadGradientFns() : null;
|
|
150
|
-
if (theme === "cyberpunk" && grad && boxenLib) {
|
|
151
|
-
const asciiStyled = grad.cyberpunk(donixAsciiBlock());
|
|
152
|
-
const titleLine = `${import_picocolors.default.bold(grad.coolStatus("FCA-UNOFFICIAL"))} ${import_picocolors.default.dim(`v${version}`)}`;
|
|
153
|
-
const body2 = `${asciiStyled}
|
|
154
|
-
${titleLine}
|
|
155
|
-
${styles.text("Author:")} ${grad.coolStatus("DongDev (Donix-VN)")}
|
|
156
|
-
${styles.text("Status:")} ${import_picocolors.default.green("Ready to Connect")}`;
|
|
157
|
-
writeStdout(
|
|
158
|
-
boxenLib(body2, {
|
|
159
|
-
padding: 1,
|
|
160
|
-
margin: 0,
|
|
161
|
-
borderStyle: "double",
|
|
162
|
-
borderColor: "cyan"
|
|
163
|
-
})
|
|
164
|
-
);
|
|
165
|
-
return;
|
|
166
|
-
}
|
|
167
|
-
const art = [
|
|
168
|
-
"\u2554\u2566\u2557\u2554\u2550\u2557\u2554\u2557\u2554\u2566\u2550\u2557\u2566 \u2566",
|
|
169
|
-
" \u2551\u2551\u2551 \u2551\u2551\u2551\u2551\u2560\u2566\u255D\u255A\u2566\u255D",
|
|
170
|
-
"\u2550\u2569\u255D\u255A\u2550\u255D\u255D\u255A\u255D\u2569\u255A\u2550 \u2569 DONIX"
|
|
171
|
-
].join("\n");
|
|
172
|
-
const body = `${import_picocolors.default.bold(styles.info("FCA-UNOFFICIAL"))} ${import_picocolors.default.dim(`v${version}`)}
|
|
173
|
-
${styles.text("Author:")} ${styles.info("DongDev (Donix-VN)")}
|
|
174
|
-
${styles.text("Status:")} ${import_picocolors.default.green("Ready to Connect")}
|
|
175
|
-
${styles.banner(art)}`;
|
|
176
|
-
if (boxenLib) {
|
|
177
|
-
writeStdout(
|
|
178
|
-
boxenLib(body, {
|
|
179
|
-
padding: 1,
|
|
180
|
-
margin: 0,
|
|
181
|
-
borderStyle: "round",
|
|
182
|
-
borderColor: "cyan"
|
|
183
|
-
})
|
|
184
|
-
);
|
|
185
|
-
return;
|
|
186
|
-
}
|
|
187
|
-
writeStdout(styles.banner(body));
|
|
188
|
-
}
|
|
189
127
|
function logLine(text, type) {
|
|
190
128
|
const level = String(type || "info").toLowerCase();
|
|
191
129
|
const message = String(text ?? "");
|
|
@@ -222,14 +160,12 @@ function logLine(text, type) {
|
|
|
222
160
|
const bodyOut = grad ? grad.coolStatus(parts.body) : styles.info(parts.body);
|
|
223
161
|
writeStdout(`${ts} ${labelOut} : ${bodyOut}`);
|
|
224
162
|
}
|
|
225
|
-
var import_picocolors, import_gradient_string,
|
|
163
|
+
var import_picocolors, import_gradient_string, oraFactory, progressCtor, progressPreset, gradientFns, baseLogger, logger_default;
|
|
226
164
|
var init_logger = __esm({
|
|
227
165
|
"src/func/logger.ts"() {
|
|
228
166
|
"use strict";
|
|
229
167
|
import_picocolors = __toESM(require("picocolors"));
|
|
230
168
|
import_gradient_string = __toESM(require("gradient-string"));
|
|
231
|
-
didPrintBootBanner = false;
|
|
232
|
-
boxenLib = null;
|
|
233
169
|
oraFactory = null;
|
|
234
170
|
progressCtor = null;
|
|
235
171
|
progressPreset = null;
|
|
@@ -240,8 +176,6 @@ var init_logger = __esm({
|
|
|
240
176
|
baseLogger.warn = (text) => baseLogger(text, "warn");
|
|
241
177
|
baseLogger.error = (text) => baseLogger(text, "error");
|
|
242
178
|
baseLogger.showBanner = async () => {
|
|
243
|
-
await ensureUiLibs();
|
|
244
|
-
printBootBanner(makeStyles(getTheme()));
|
|
245
179
|
};
|
|
246
180
|
baseLogger.startSpinner = async (text) => {
|
|
247
181
|
await ensureUiLibs();
|
|
@@ -15652,7 +15586,7 @@ var init_package = __esm({
|
|
|
15652
15586
|
"package.json"() {
|
|
15653
15587
|
package_default = {
|
|
15654
15588
|
name: "@dongdev/fca-unofficial",
|
|
15655
|
-
version: "4.0.
|
|
15589
|
+
version: "4.0.2",
|
|
15656
15590
|
description: "Unofficial Facebook Chat API for Node.js - Interact with Facebook Messenger programmatically",
|
|
15657
15591
|
main: "dist/cjs.cjs",
|
|
15658
15592
|
types: "dist/index.d.ts",
|
|
@@ -15721,7 +15655,6 @@ var init_package = __esm({
|
|
|
15721
15655
|
axios: "^1.13.5",
|
|
15722
15656
|
"axios-cookiejar-support": "^5.0.5",
|
|
15723
15657
|
bluebird: "^3.7.2",
|
|
15724
|
-
boxen: "^8.0.1",
|
|
15725
15658
|
cheerio: "^1.0.0-rc.10",
|
|
15726
15659
|
"cli-progress": "^3.12.0",
|
|
15727
15660
|
duplexify: "^4.1.3",
|
package/dist/index.mjs
CHANGED
|
@@ -72,8 +72,7 @@ function makeStyles(theme) {
|
|
|
72
72
|
info: (v) => pc.cyan(v),
|
|
73
73
|
warn: (v) => pc.yellow(v),
|
|
74
74
|
error: (v) => pc.red(v),
|
|
75
|
-
sys: (v) => pc.blue(v)
|
|
76
|
-
banner: (v) => pc.white(v)
|
|
75
|
+
sys: (v) => pc.blue(v)
|
|
77
76
|
};
|
|
78
77
|
}
|
|
79
78
|
return {
|
|
@@ -82,8 +81,7 @@ function makeStyles(theme) {
|
|
|
82
81
|
info: (v) => pc.cyan(v),
|
|
83
82
|
warn: (v) => pc.yellow(v),
|
|
84
83
|
error: (v) => pc.red(v),
|
|
85
|
-
sys: (v) => pc.blue(v)
|
|
86
|
-
banner: (v) => pc.cyan(v)
|
|
84
|
+
sys: (v) => pc.blue(v)
|
|
87
85
|
};
|
|
88
86
|
}
|
|
89
87
|
function parseLabel(message, fallback) {
|
|
@@ -116,22 +114,7 @@ function formatSuccessBody(body, grad, fallbackPaint) {
|
|
|
116
114
|
}
|
|
117
115
|
return fallbackPaint(body);
|
|
118
116
|
}
|
|
119
|
-
function donixAsciiBlock() {
|
|
120
|
-
return [
|
|
121
|
-
"____ ____ ____ ____ ____",
|
|
122
|
-
"||D ||||O ||||N ||||I ||||X ||",
|
|
123
|
-
"||__||||__||||__||||__||||__||",
|
|
124
|
-
"|/__\\||/__\\||/__\\||/__\\||/__\\|"
|
|
125
|
-
].join("\n");
|
|
126
|
-
}
|
|
127
117
|
async function ensureUiLibs() {
|
|
128
|
-
if (!boxenLib) {
|
|
129
|
-
try {
|
|
130
|
-
const boxenMod = await import("boxen");
|
|
131
|
-
boxenLib = boxenMod.default ?? boxenMod;
|
|
132
|
-
} catch {
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
118
|
if (!oraFactory) {
|
|
136
119
|
try {
|
|
137
120
|
const oraMod = await import("ora");
|
|
@@ -148,51 +131,6 @@ async function ensureUiLibs() {
|
|
|
148
131
|
}
|
|
149
132
|
}
|
|
150
133
|
}
|
|
151
|
-
function printBootBanner(styles) {
|
|
152
|
-
if (didPrintBootBanner) return;
|
|
153
|
-
didPrintBootBanner = true;
|
|
154
|
-
const version = process.env.npm_package_version || "4.0.1";
|
|
155
|
-
const theme = getTheme();
|
|
156
|
-
const grad = theme === "cyberpunk" ? loadGradientFns() : null;
|
|
157
|
-
if (theme === "cyberpunk" && grad && boxenLib) {
|
|
158
|
-
const asciiStyled = grad.cyberpunk(donixAsciiBlock());
|
|
159
|
-
const titleLine = `${pc.bold(grad.coolStatus("FCA-UNOFFICIAL"))} ${pc.dim(`v${version}`)}`;
|
|
160
|
-
const body2 = `${asciiStyled}
|
|
161
|
-
${titleLine}
|
|
162
|
-
${styles.text("Author:")} ${grad.coolStatus("DongDev (Donix-VN)")}
|
|
163
|
-
${styles.text("Status:")} ${pc.green("Ready to Connect")}`;
|
|
164
|
-
writeStdout(
|
|
165
|
-
boxenLib(body2, {
|
|
166
|
-
padding: 1,
|
|
167
|
-
margin: 0,
|
|
168
|
-
borderStyle: "double",
|
|
169
|
-
borderColor: "cyan"
|
|
170
|
-
})
|
|
171
|
-
);
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
const art = [
|
|
175
|
-
"\u2554\u2566\u2557\u2554\u2550\u2557\u2554\u2557\u2554\u2566\u2550\u2557\u2566 \u2566",
|
|
176
|
-
" \u2551\u2551\u2551 \u2551\u2551\u2551\u2551\u2560\u2566\u255D\u255A\u2566\u255D",
|
|
177
|
-
"\u2550\u2569\u255D\u255A\u2550\u255D\u255D\u255A\u255D\u2569\u255A\u2550 \u2569 DONIX"
|
|
178
|
-
].join("\n");
|
|
179
|
-
const body = `${pc.bold(styles.info("FCA-UNOFFICIAL"))} ${pc.dim(`v${version}`)}
|
|
180
|
-
${styles.text("Author:")} ${styles.info("DongDev (Donix-VN)")}
|
|
181
|
-
${styles.text("Status:")} ${pc.green("Ready to Connect")}
|
|
182
|
-
${styles.banner(art)}`;
|
|
183
|
-
if (boxenLib) {
|
|
184
|
-
writeStdout(
|
|
185
|
-
boxenLib(body, {
|
|
186
|
-
padding: 1,
|
|
187
|
-
margin: 0,
|
|
188
|
-
borderStyle: "round",
|
|
189
|
-
borderColor: "cyan"
|
|
190
|
-
})
|
|
191
|
-
);
|
|
192
|
-
return;
|
|
193
|
-
}
|
|
194
|
-
writeStdout(styles.banner(body));
|
|
195
|
-
}
|
|
196
134
|
function logLine(text, type) {
|
|
197
135
|
const level = String(type || "info").toLowerCase();
|
|
198
136
|
const message = String(text ?? "");
|
|
@@ -229,12 +167,10 @@ function logLine(text, type) {
|
|
|
229
167
|
const bodyOut = grad ? grad.coolStatus(parts.body) : styles.info(parts.body);
|
|
230
168
|
writeStdout(`${ts} ${labelOut} : ${bodyOut}`);
|
|
231
169
|
}
|
|
232
|
-
var
|
|
170
|
+
var oraFactory, progressCtor, progressPreset, gradientFns, baseLogger, logger_default;
|
|
233
171
|
var init_logger = __esm({
|
|
234
172
|
"src/func/logger.ts"() {
|
|
235
173
|
"use strict";
|
|
236
|
-
didPrintBootBanner = false;
|
|
237
|
-
boxenLib = null;
|
|
238
174
|
oraFactory = null;
|
|
239
175
|
progressCtor = null;
|
|
240
176
|
progressPreset = null;
|
|
@@ -245,8 +181,6 @@ var init_logger = __esm({
|
|
|
245
181
|
baseLogger.warn = (text) => baseLogger(text, "warn");
|
|
246
182
|
baseLogger.error = (text) => baseLogger(text, "error");
|
|
247
183
|
baseLogger.showBanner = async () => {
|
|
248
|
-
await ensureUiLibs();
|
|
249
|
-
printBootBanner(makeStyles(getTheme()));
|
|
250
184
|
};
|
|
251
185
|
baseLogger.startSpinner = async (text) => {
|
|
252
186
|
await ensureUiLibs();
|
|
@@ -15656,7 +15590,7 @@ var init_package = __esm({
|
|
|
15656
15590
|
"package.json"() {
|
|
15657
15591
|
package_default = {
|
|
15658
15592
|
name: "@dongdev/fca-unofficial",
|
|
15659
|
-
version: "4.0.
|
|
15593
|
+
version: "4.0.2",
|
|
15660
15594
|
description: "Unofficial Facebook Chat API for Node.js - Interact with Facebook Messenger programmatically",
|
|
15661
15595
|
main: "dist/cjs.cjs",
|
|
15662
15596
|
types: "dist/index.d.ts",
|
|
@@ -15725,7 +15659,6 @@ var init_package = __esm({
|
|
|
15725
15659
|
axios: "^1.13.5",
|
|
15726
15660
|
"axios-cookiejar-support": "^5.0.5",
|
|
15727
15661
|
bluebird: "^3.7.2",
|
|
15728
|
-
boxen: "^8.0.1",
|
|
15729
15662
|
cheerio: "^1.0.0-rc.10",
|
|
15730
15663
|
"cli-progress": "^3.12.0",
|
|
15731
15664
|
duplexify: "^4.1.3",
|
package/fca-config.example.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dongdev/fca-unofficial",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"description": "Unofficial Facebook Chat API for Node.js - Interact with Facebook Messenger programmatically",
|
|
5
5
|
"main": "dist/cjs.cjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -69,7 +69,6 @@
|
|
|
69
69
|
"axios": "^1.13.5",
|
|
70
70
|
"axios-cookiejar-support": "^5.0.5",
|
|
71
71
|
"bluebird": "^3.7.2",
|
|
72
|
-
"boxen": "^8.0.1",
|
|
73
72
|
"cheerio": "^1.0.0-rc.10",
|
|
74
73
|
"cli-progress": "^3.12.0",
|
|
75
74
|
"duplexify": "^4.1.3",
|