@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.
- package/index.js +4 -7
- package/package.json +1 -1
package/index.js
CHANGED
@@ -20,18 +20,15 @@ async function launcher(
|
|
20
20
|
return;
|
21
21
|
}
|
22
22
|
|
23
|
-
|
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 <
|
31
|
+
if (expire < Math.floor(Date.now() / 1000)) process.exit();
|
35
32
|
}, 5000);
|
36
33
|
}
|
37
34
|
}
|