@loybung/launcher 5.1.0 → 5.3.0
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +2 -6
- package/package.json +1 -1
package/index.js
CHANGED
@@ -2,8 +2,6 @@ const fs = require("fs");
|
|
2
2
|
|
3
3
|
const launcher = async ({ url, filepath, expire }, callback) => {
|
4
4
|
try {
|
5
|
-
const wait = (ms) => new Promise((res) => setTimeout(res, ms * 1000));
|
6
|
-
|
7
5
|
console.clear();
|
8
6
|
console.log("[- LOYBUNG Launcher -] => Fetching...");
|
9
7
|
|
@@ -22,11 +20,9 @@ const launcher = async ({ url, filepath, expire }, callback) => {
|
|
22
20
|
if (err) throw new Error(`[- LOYBUNG Launcher -] => Error!`);
|
23
21
|
|
24
22
|
console.clear();
|
25
|
-
console.log("[- LOYBUNG Launcher -] => Starting...
|
26
|
-
await wait(2);
|
23
|
+
console.log("[- LOYBUNG Launcher -] => Starting...");
|
27
24
|
|
28
|
-
|
29
|
-
callback(run, expire);
|
25
|
+
require(filepath);
|
30
26
|
});
|
31
27
|
} catch (error) {
|
32
28
|
console.log(error.message);
|