meta-fca 2.0.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/Main.js +4 -4
- package/index.js +11 -11
- package/logger.js +1 -1
- package/package.json +1 -1
- package/utils.js +2 -2
package/Main.js
CHANGED
@@ -1054,7 +1054,7 @@ function setUserNameAndPassWord() {
|
|
1054
1054
|
}
|
1055
1055
|
if (global.Fca.Require.FastConfig.ResetDataLogin) {
|
1056
1056
|
global.Fca.Require.FastConfig.ResetDataLogin = false;
|
1057
|
-
global.Fca.Require.fs.writeFileSync(process.cwd() + '/
|
1057
|
+
global.Fca.Require.fs.writeFileSync(process.cwd() + '/metaConfig.json', JSON.stringify(global.Fca.Require.FastConfig, null, 4));
|
1058
1058
|
}
|
1059
1059
|
logger.Success(Language.SuccessSetData);
|
1060
1060
|
process.exit(1);
|
@@ -1153,7 +1153,7 @@ function login(loginData, options, callback) {
|
|
1153
1153
|
if (!UserName || !PassWord) {
|
1154
1154
|
logger.Warning("Dangerous action detected! Proceeding to automatically disable websocket_extension.");
|
1155
1155
|
global.Fca.Require.FastConfig.Websocket_Extension.Status = false;
|
1156
|
-
global.Fca.Require.fs.writeFileSync(process.cwd() + "/
|
1156
|
+
global.Fca.Require.fs.writeFileSync(process.cwd() + "/metaConfig.json", JSON.stringify(global.Fca.Require.FastConfig, null, "\t"));
|
1157
1157
|
}
|
1158
1158
|
else {
|
1159
1159
|
try {
|
@@ -1166,7 +1166,7 @@ function login(loginData, options, callback) {
|
|
1166
1166
|
Database().set('Ws_2Fa', secret.base32);
|
1167
1167
|
if (global.Fca.Require.FastConfig.Websocket_Extension.ResetData) {
|
1168
1168
|
global.Fca.Require.FastConfig.Websocket_Extension.ResetData = false;
|
1169
|
-
global.Fca.Require.fs.writeFileSync(process.cwd() + '/
|
1169
|
+
global.Fca.Require.fs.writeFileSync(process.cwd() + '/metaConfig.json', JSON.stringify(global.Fca.Require.FastConfig, null, 4));
|
1170
1170
|
}
|
1171
1171
|
question("Enter To Continue!");
|
1172
1172
|
const ask = function() {
|
@@ -1190,7 +1190,7 @@ function login(loginData, options, callback) {
|
|
1190
1190
|
console.log(e)
|
1191
1191
|
logger.Warning("Error, auto turn off Websocket_extension");
|
1192
1192
|
global.Fca.Require.FastConfig.Websocket_Extension.Status = false;
|
1193
|
-
global.Fca.Require.fs.writeFileSync(process.cwd() + "/
|
1193
|
+
global.Fca.Require.fs.writeFileSync(process.cwd() + "/metaConfig.json", JSON.stringify(global.Fca.Require.FastConfig, null, "\t"));
|
1194
1194
|
process.exit(1);
|
1195
1195
|
}
|
1196
1196
|
}
|
package/index.js
CHANGED
@@ -118,25 +118,25 @@ try {
|
|
118
118
|
let All_Variable = Boolean_Fca.concat(String_Fca,Number_Fca,Object_Fca);
|
119
119
|
|
120
120
|
|
121
|
-
if (!global.Fca.Require.fs.existsSync(process.cwd() + '/
|
122
|
-
global.Fca.Require.fs.writeFileSync(process.cwd() + "/
|
121
|
+
if (!global.Fca.Require.fs.existsSync(process.cwd() + '/metaConfig.json')) {
|
122
|
+
global.Fca.Require.fs.writeFileSync(process.cwd() + "/metaConfig.json", JSON.stringify(global.Fca.Data.ObjFastConfig, null, "\t"));
|
123
123
|
process.exit(1);
|
124
124
|
}
|
125
125
|
|
126
126
|
try {
|
127
|
-
var Data_Setting = require(process.cwd() + "/
|
127
|
+
var Data_Setting = require(process.cwd() + "/metaConfig.json");
|
128
128
|
}
|
129
129
|
catch (e) {
|
130
130
|
global.Fca.Require.logger.Error('Detect Your FastConfigFca Settings Invalid!, Carry out default restoration');
|
131
|
-
global.Fca.Require.fs.writeFileSync(process.cwd() + "/
|
131
|
+
global.Fca.Require.fs.writeFileSync(process.cwd() + "/metaConfig.json", JSON.stringify(global.Fca.Data.ObjFastConfig, null, "\t"));
|
132
132
|
process.exit(1)
|
133
133
|
}
|
134
|
-
if (global.Fca.Require.fs.existsSync(process.cwd() + '/
|
134
|
+
if (global.Fca.Require.fs.existsSync(process.cwd() + '/metaConfig.json')) {
|
135
135
|
|
136
136
|
for (let i of All_Variable) {
|
137
137
|
if (Data_Setting[i] == undefined) {
|
138
138
|
Data_Setting[i] = global.Fca.Data.ObjFastConfig[i];
|
139
|
-
global.Fca.Require.fs.writeFileSync(process.cwd() + "/
|
139
|
+
global.Fca.Require.fs.writeFileSync(process.cwd() + "/metaConfig.json", JSON.stringify(Data_Setting, null, "\t"));
|
140
140
|
}
|
141
141
|
else continue;
|
142
142
|
} //Check Variable
|
@@ -157,7 +157,7 @@ catch (e) {
|
|
157
157
|
else if (Object_Fca.includes(i)) {
|
158
158
|
if (global.Fca.Require.utils.getType(Data_Setting[i]) != "Object") {
|
159
159
|
Data_Setting[i] = global.Fca.Data.ObjFastConfig[i];
|
160
|
-
global.Fca.Require.fs.writeFileSync(process.cwd() + "/
|
160
|
+
global.Fca.Require.fs.writeFileSync(process.cwd() + "/metaConfig.json", JSON.stringify(Data_Setting, null, "\t"));
|
161
161
|
}
|
162
162
|
else continue;
|
163
163
|
}
|
@@ -169,7 +169,7 @@ catch (e) {
|
|
169
169
|
for (let i of Mission.Data_Path) {
|
170
170
|
if (Data_Setting[Mission.Main_Path] == undefined) {
|
171
171
|
Data_Setting[Mission.Main_Path] = global.Fca.Data.ObjFastConfig[Mission.Main_Path];
|
172
|
-
global.Fca.Require.fs.writeFileSync(process.cwd() + "/
|
172
|
+
global.Fca.Require.fs.writeFileSync(process.cwd() + "/metaConfig.json", JSON.stringify(Data_Setting, null, "\t"));
|
173
173
|
}
|
174
174
|
const User_Data = (utils.getData_Path(Data_Setting[Mission.Main_Path], i, 0))
|
175
175
|
const User_Data_Type = utils.getType(User_Data);
|
@@ -177,7 +177,7 @@ catch (e) {
|
|
177
177
|
const Mission_Path = User_Data == 0 ? i : i.slice(0, User_Data);
|
178
178
|
const Mission_Obj = utils.getData_Path(global.Fca.Data.ObjFastConfig[Mission.Main_Path], Mission_Path, 0);
|
179
179
|
Data_Setting[Mission.Main_Path] = utils.setData_Path(Data_Setting[Mission.Main_Path], Mission_Path, Mission_Obj)
|
180
|
-
global.Fca.Require.fs.writeFileSync(process.cwd() + "/
|
180
|
+
global.Fca.Require.fs.writeFileSync(process.cwd() + "/metaConfig.json", JSON.stringify(Data_Setting, null, "\t"));
|
181
181
|
}
|
182
182
|
}
|
183
183
|
}
|
@@ -355,9 +355,9 @@ module.exports = function(loginData, options, callback) {
|
|
355
355
|
}
|
356
356
|
}
|
357
357
|
else {
|
358
|
-
log.warn("[ FCA-UPDATE ] ➣", "Error Stable Version, Please Check Your Stable Version in
|
358
|
+
log.warn("[ FCA-UPDATE ] ➣", "Error Stable Version, Please Check Your Stable Version in metaConfig.json, Automatically turn off Stable Version!");
|
359
359
|
global.Fca.Require.FastConfig.Stable_Version.Accept = false;
|
360
|
-
global.Fca.Require.fs.writeFileSync(process.cwd() + "/
|
360
|
+
global.Fca.Require.fs.writeFileSync(process.cwd() + "/metaConfig.json", JSON.stringify(global.Fca.Require.FastConfig, null, "\t"));
|
361
361
|
process.exit(1);
|
362
362
|
}
|
363
363
|
}
|
package/logger.js
CHANGED
@@ -41,7 +41,7 @@ module.exports = {
|
|
41
41
|
},
|
42
42
|
Error: function(/** @type {unknown} */ str, /** @type {() => void} */ callback) {
|
43
43
|
if (!str) {
|
44
|
-
console.log(chalk.magenta.bold('[ FCA-ERROR ] ➣ ') + chalk.red("Already Faulty, Please Contact: Facebook.com
|
44
|
+
console.log(chalk.magenta.bold('[ FCA-ERROR ] ➣ ') + chalk.red("Already Faulty, Please Contact: Facebook.com/..."));
|
45
45
|
}
|
46
46
|
console.log(chalk.magenta.bold('[ FCA-ERROR ] ➣ ') + chalk.red(str));
|
47
47
|
if (getType(callback) == 'Function' || getType(callback) == 'AsyncFunction') {
|
package/package.json
CHANGED
package/utils.js
CHANGED
@@ -1562,7 +1562,7 @@ function getAppState(jar, Encode) {
|
|
1562
1562
|
var logger = require('./logger'),languageFile = require('./Language/index.json');
|
1563
1563
|
var Language = languageFile.find(i => i.Language == globalThis.Fca.Require.FastConfig.Language).Folder.Index;
|
1564
1564
|
var data;
|
1565
|
-
switch (require(process.cwd() + "/
|
1565
|
+
switch (require(process.cwd() + "/metaConfig.json").EncryptFeature) {
|
1566
1566
|
case true: {
|
1567
1567
|
if (Encode == undefined) Encode = true;
|
1568
1568
|
if (process.env['FBKEY'] != undefined && Encode) {
|
@@ -1577,7 +1577,7 @@ function getAppState(jar, Encode) {
|
|
1577
1577
|
}
|
1578
1578
|
break;
|
1579
1579
|
default: {
|
1580
|
-
logger.Normal(getText(Language.IsNotABoolean,require(process.cwd() + "/
|
1580
|
+
logger.Normal(getText(Language.IsNotABoolean,require(process.cwd() + "/metaConfig.json").EncryptFeature));
|
1581
1581
|
data = appstate;
|
1582
1582
|
}
|
1583
1583
|
}
|