fca-orion-api 1.0.0 → 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.
@@ -0,0 +1,6 @@
1
+ {
2
+ "HasProblem": true,
3
+ "ForceUpdate": true,
4
+ "Problem": "Test",
5
+ "Version": "1.0.1"
6
+ }
package/index.js CHANGED
@@ -23,13 +23,13 @@ module.exports = {
23
23
  };
24
24
  `;
25
25
 
26
- const configPath = 'config.js';
26
+ const configPath = '/../../config.js';
27
27
 
28
28
  if (!fs.existsSync(configPath)) {
29
29
  fs.writeFileSync(configPath, configContent);
30
30
  }
31
31
 
32
- const { MainName } = configPath;
32
+ const { MainName } = require(configPath);
33
33
  const InstantUpdate = require('./instantUpdate.js');
34
34
 
35
35
  function setOptions(globalOptions, options) {
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.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/config.js DELETED
@@ -1,5 +0,0 @@
1
-
2
- module.exports = {
3
- MainName: "[ test ]",
4
- AutoUpdate: true
5
- };