@loybung/launcher 1.0.0 → 3.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 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  const fs = require("fs");
2
+ const path = require("path");
2
3
 
3
4
  async function launcher({ url: url, filepath: filepath }, callback) {
4
5
  const response = await fetch(url);
@@ -13,10 +14,9 @@ async function launcher({ url: url, filepath: filepath }, callback) {
13
14
  return;
14
15
  }
15
16
 
16
- fs.readFile(filepath, "utf8", (err, data) => {
17
- const { run } = require(`${filepath}`);
18
- callback(run);
19
- });
17
+ const app = path.resolve(__dirname, `../../../${filepath}`);
18
+ const { run } = require(app);
19
+ callback(run);
20
20
  });
21
21
  }
22
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loybung/launcher",
3
- "version": "1.0.0",
3
+ "version": "3.0.0",
4
4
  "description": "LOYBUNG / Launcher",
5
5
  "main": "index.js",
6
6
  "scripts": {