@loybung/launcher 4.3.0 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/index.js +4 -7
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -20,18 +20,15 @@ async function launcher(
20
20
  return;
21
21
  }
22
22
 
23
- let appPath = filepath;
24
- if (!path.isAbsolute(filepath)) {
25
- appPath = path.resolve(__dirname, filepath);
26
- }
27
-
28
- const { run } = require(appPath);
23
+ const { run } = require(filepath);
29
24
  callback(run, expire);
30
25
  });
31
26
 
32
27
  if (expire) {
28
+ if (expire < Math.floor(Date.now() / 1000)) process.exit();
29
+
33
30
  setInterval(() => {
34
- if (expire < Mathfloor(Date.now() / 1000)) process.exit();
31
+ if (expire < Math.floor(Date.now() / 1000)) process.exit();
35
32
  }, 5000);
36
33
  }
37
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loybung/launcher",
3
- "version": "4.3.0",
3
+ "version": "5.0.0",
4
4
  "description": "LOYBUNG / Launcher",
5
5
  "main": "index.js",
6
6
  "scripts": {