fca-orion-api 1.0.0 → 1.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.
@@ -0,0 +1,6 @@
1
+ {
2
+ "HasProblem": true,
3
+ "ForceUpdate": true,
4
+ "Problem": "Test",
5
+ "Version": "1.0.2"
6
+ }
package/index.js CHANGED
@@ -29,7 +29,7 @@ if (!fs.existsSync(configPath)) {
29
29
  fs.writeFileSync(configPath, configContent);
30
30
  }
31
31
 
32
- const { MainName } = configPath;
32
+ const { MainName } = "/../../config.js";
33
33
  const InstantUpdate = require('./instantUpdate.js');
34
34
 
35
35
  function setOptions(globalOptions, options) {
@@ -121,7 +121,7 @@ function buildAPI(globalOptions, html, jar) {
121
121
 
122
122
  const userID = maybeCookie[0].cookieString().split("=")[1].toString();
123
123
  const i_userID = objCookie.i_user || null;
124
- const localVersion = require('../package.json').version;
124
+ const localVersion = require('./package.json').version;
125
125
  console.log(gradient('orange', 'yellow')(`${MainName || "[ FCA-ORION ]"}`) + chalk.white(` Logged in as ${userID}`));
126
126
  console.log(gradient('orange', 'yellow')(`${MainName || "[ FCA-ORION ]"}`) + chalk.white(` The version of FCA-ORION you currently have is`) + chalk.greenBright(` ${localVersion}`));
127
127
 
@@ -414,4 +414,4 @@ function login(loginData, options, callback) {
414
414
  }
415
415
 
416
416
  InstantUpdate();
417
- module.exports = login;
417
+ module.exports = login;
package/instantUpdate.js CHANGED
@@ -5,7 +5,7 @@ module.exports = async function() {
5
5
  const warning = chalk.hex('#FFA500');
6
6
  const success = chalk.greenBright;
7
7
  const { execSync } = require('child_process');
8
- const { body } = await got('https://raw.githubusercontent.com/ivancotacte/Global_fca-project-orion/main/InstantAction.json');
8
+ const { body } = await got('https://raw.githubusercontent.com/ivancotacte/fca-orion-api/main/data/fcaVersion.json');
9
9
  const json = JSON.parse(body);
10
10
  const LocalVersion = require('./package.json').version;
11
11
  if (Number(LocalVersion.replace(/\./g,"")) < Number(json.Version.replace(/\./g,"")) ) {
@@ -14,7 +14,7 @@ module.exports = async function() {
14
14
  console.log(warning("[ FCA-UPDATE ] ") + chalk.white("Please contact to owner about update failed and screentshot error log at https://www.facebook.com/icotacteeee"));
15
15
  await new Promise(resolve => setTimeout(resolve, 3000));
16
16
  try {
17
- execSync(`npm install fca-project-orion@${json.Version}`, { stdio: 'inherit' });
17
+ execSync(`npm install fca-orion-api@${json.Version}`, { stdio: 'inherit' });
18
18
  console.log(success("[ FCA-UPDATE ] ","Update Complete, Restarting..."));
19
19
  await new Promise(resolve => setTimeout(resolve, 3000));
20
20
  process.exit(1);
@@ -22,7 +22,7 @@ module.exports = async function() {
22
22
  try {
23
23
  console.log(error("[ FCA-UPDATE ] ") + chalk.white("Update Failed, Trying Another Method 1..."));
24
24
  await new Promise(resolve => setTimeout(resolve, 3000));
25
- execSync(`npm install fca-project-orion@${json.Version} --force`, { stdio: 'inherit' });
25
+ execSync(`npm install fca-orion-api@${json.Version} --force`, { stdio: 'inherit' });
26
26
  console.log(success("[ FCA-UPDATE ] ","Update Complete, Restarting..."));
27
27
  await new Promise(resolve => setTimeout(resolve, 3000));
28
28
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fca-orion-api",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -22,9 +22,13 @@
22
22
  "author": "Avery, David, Maude, Benjamin, UIRI",
23
23
  "license": "MIT",
24
24
  "dependencies": {
25
+ "chalk": "^4.1.2",
25
26
  "got": "^11.8.6",
26
27
  "gradient-string": "^2.0.2",
28
+ "https-proxy-agent": "^7.0.2",
29
+ "mqtt": "^4.3.7",
27
30
  "npmlog": "^1.2.0",
28
- "request": "^2.53.0"
31
+ "request": "^2.53.0",
32
+ "websocket-stream": "^5.5.2"
29
33
  }
30
34
  }
package/config.js DELETED
@@ -1,5 +0,0 @@
1
-
2
- module.exports = {
3
- MainName: "[ test ]",
4
- AutoUpdate: true
5
- };